Datatable - For each activity

HI All, I am trying to search web with for each row of data table activity. Datatable was created from CSV file. But when I am running the bot, search is made for “System.Data.Datarow” instead of row values.

Please let me know where am I going wrong…

@Bharath_Kumar3
welcome to the forum

use for the looping the for each row / for each row in datatable activity

accessing a column value we can do e.g. row(“MyColumnName”) or using the column index row(1) for the second value

Hi

Welcome to uipath forum

If you want to pass entire Datarow then mention like this with hyphens as delimiter between each value then

String.Join(“-“, CurrentRow.ItemArray).ToString

This is of type string

Else if you are passing any Datarow then it will show like this only System.Data.Datarow

Or

If you want to pass a specific row and specific column value then inside the FOR EACH ROW activity mention like this
CurrentRow(“yourcolumnname”).ToString

If you don’t know the column name then mention the column position where position starts from 0 for first column like this
CurrentRow(0).ToString

Hope this would help you resolve this

Cheers @Bharath_Kumar3

Thank you @Palaniyappan and @ppr

It worked!!

1 Like

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