Filter rows by column values

Hi guys, I am a beginner in uipath. I am trying to filter the rows of the datatble by certain column value. I have read the other forums and gotten the answer. However, I have an error which i can’t solve.
I assigned the the column name = x to result (type argument is datarow). Then, in the for each row, I cannot put in result. As the error says value of type 1- dimensional array system.data.datarow cannot be converted to system.data.datatable.
Sequence.xaml (7.8 KB)

So, the output of the .select statement is actually an array of datarows, not a smaller datatable.

So, you can’t use the ‘For each row’ activity as it only accepts a datatable as the input.

You need to use the ‘For each’ activity instead and set the TypeArgument to datarow. That will allow you to iterate through your array of datarows.

Sequence-2.xaml (7.9 KB)

Oh, I didn’t know ‘For each row’ activity and ‘For each’ activity is different. Thank you for your help :slight_smile:

2 Likes