Read DataTable columns

Hello all. I need help with DataTable columns
I have DataTable like this:

Column0 Column1 Column2 Column3
Mark Greg Sofa Alex
23 25 30 22

I need reed name and then age, and write it in two fields in loop.
I know how to write them in the fields, but i don’t understand how to loop through the DataTable

Can u elaborate ur case better @Arettu63

I have DataTable like this:

Column0 Column1 Column2 Column3
Mark Greg Sofa Alex
23 25 30 22

I need to take the second value from the first column (Mark) and write it in my form. Then take the third value from the first column (23) and write it in my form. I need to do this in a loop over all the elements.
I know how to write in form, but i don’t understand how to access table elements

Hi @Arettu63

You have to use ForEachRow activity and within ForEachRow activity

Assign : Name_Str = row.Item(“ColumnNameOf_Name”).ToString
Assign: Age_Str = row.Item(“ColumnNameOf_Age”).ToString

Thank You…

1 Like

if it is not difficult for you, you can write what the request will look like in first case ?

ForEachRow {
Assign : Name_Str = row.Item(“Column0”).ToString ??
}

@Arettu63

Refer below post for your reference
RPA DataTable: Get Previous Row Column Value, Set to Current Row Column Value

Also you can see more videos to get to know about the Datatable

Hope this helps you

Thanks

@Arettu63
find starter help here:
ForEach_AllCols_TakeRowN-N+1.xaml (7.8 KB)

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