For each row activity

Hi all,


For example: I would like to run a process for each “Referenz” Number, so in that example 3 times. But in my activity the process does not stop after the last Referenznumber, it also does the process for the fourth (blank) row, what I dont want.

Any ideas?

Many thanks!!

@Markus3003 Could you please share the screenshot of your workflow?

1 Like

Hi @Markus3003 !
Did you check the box “add headers” ? If no, you should.
How many times does it loop ? More than four ? If yes, that means that there are probably data somewhere else in the column Referenz, remove then these blank rows

Hi @Markus3003 ,

Please find the solution below:

dtResult.AsEnumerable.Select(Function(d) Not d.Item(“Referenz”).ToString.Trim.Equals("")).ToList

This will convert your datatable into a List of Unique DataRows that you can iterate through.

-Ashwin A.K

1 Like

Use Filter Data table activity before for each row. input and output = your DT

1 Like


You can check by making a message box inside the for each row loop and check what it is populating from the 4th row

Also as @Hiba_B said check Read Range->Properties->Add Header is enabled.

Hope this may help you