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

@susan.ng Welcome to community instead of % use mod and try

Hi @susan.ng

Check this

DtInput.Select("[‘Values’]%2=‘0’").CopyToDataTable()

U this
or use mod instead of %

Thanks
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

Hi @susan.ng

Mention your column name

Thanks
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.

Regards
Susan