How to correctly set the condition for filtering a column

I filtered the table and now I need to set a condition, if column “Document type” contains the value “RM”, then we update the table.
I used activity For each and added a condition if
row(“Document type”).ToString.Contains(“RM”)
but the robot gives an error, please tell me what the error is

Hi @yulya

You need to use For each row of datatable instead of For each item!



You are using For Each activity in the flowchart. This activity is for perform serious of actions on each element of an enumeration. The Argument Type Should support IEnumerable.

UiPath providing a dedicated activity ‘For Each Row in DataTable’

and of course you can filter it whatever you want by using LINQ query/expression. Ex: (select, where etc)

Hope this will help you. Thank you.

Yes, thank you!