Read unknown number of column values inside a for each row activity

I have read each row of a datatable by using for each row activity.Now I’m not aware about the number of columns in each row. How can i check a condition whether a particular string is found in any of the column in each row.

Hi @rifnanahas

-To get the count of column use DataTable.Columns.Count.ToString
-To check if column exist in data Table or not you can pass row.Table.Columns.Contains(“ColumnName”) in IF statement inside ‘for each row’


HI @rifnanahas

You can use the for each row activity to loop through the rows of the data table.
Inside the same for each row activity, place a For Each activity. For the data of the loop specify


Now, inside the second loop, you can access the column name using the item variable


Basically, you can access column data as: