Input data to web UI from current row in For Each Row


I have a datatable, dtTest, which contains multiple rows, each with 3 columns. In production, this number of rows will be dynamic, depending on an incoming excel template, so it can’t be hard-coded, but the columns will always be the same.

What I’m trying to do is:

Log into web URL

FOR EACH ROW → click through some menus/dropdowns and then input the values from the current row’s columns into their respective text boxes.

Is there a way to specify “current row” in an expression like:

TYPE INTO → dtTest.Rows(0).Item(1).ToString

Feel free to point me to a different thread if this is redundant. I searched a bit but didn’t find what I was looking for.



Use can try as below

CurrentRow(“Name of the Column”).ToString

Hope this may help you


Hi @andrew.forbes ,

dtTest.Rows(0).Item(1).ToString this will only work when you are working with counters and this will be written as dtTest.Rows(Counters).Item(“ColumnName”).ToString but as you told you are using foreach row so better to use row.Item(“Column Name”).ToString or row(“Column Name”).ToString

Thanks, this worked and so obvious :smiley:

1 Like

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