How To Specify Row Index in a For Each Datatable Row - Type Into

Greetings,

I have only used “For Each Excel Row” up until now. I am now filtering datatables, and thus need to use “For Each Datatable Row” I have several “Type Into” activities for each row in a datatable that are using specific cells in each row.

I tried using “CurrentRow.ByIndex(3)”, which is what worked in the “For Each Excel Row”, but its not working for the “For Each Datatable Row” activity.

Can someone tell me the correct way to specify the index in this scenario?

Thank you so much!

You don’t need to specify the index. CurrentRow IS the row with its data. You just reference your column name ie CurrentRow(“SomeColumn”).ToString or by index of the column CurrentRow(2).ToString for the 3rd column (0 based index).

Thank you!

2 Likes

For future reference, if you do actually need the index for your process (for example, storing row indexes in an array for rows you want to do something with later), then you use the Index property. It will give you the index of CurrentRow.

image

Whatever INT variable you put in there, you just reference that variable inside the For Each Row’s code.

image

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.