Error "Character is not valid"

Hello everyone,

I’m new to UiPath. I am trying to select only even numbers in a data table using Assign activity and set it to DT.Select(Convert.ToInt32(“tableColumn”)%2=0).copytodatatable

However as soon as I type % it says character is invalid. Could you please advise what is wrong and how to fix it?

Thank you very much,
Kind Regards Welcome to community instead of % use mod and try


Check this


U this
or use mod instead of %

Ashwin S

Hello Ashwin,

Thank you very much for your reply. I tried your first suggestion and it said “Value of type System.Data.Datatable” cannot be converted to Integer. Any suggestion please?

Thank you again

1 Like


Mention your column name

Ashwin S

Hello Indra,
Thanks a lot for your response. I tried replace % with mod but another error came up said "Option Strict on Disallows implicit conversion from ‘Boolean’ to ‘String’… I will upload my XML file for easier review.