Assign rows in specific column with For Each Row

I want to insert data that my Bot searched on Google Maps into a specific column in Excel.

When I want to add the obtained data to the DataTable with an assign activity, I get an error.
image

I cannot solve this error. Who can help me?

My process:
project.json (1.6 KB)
Distances.xlsx (9.9 KB)

assignment syntax for datatable would be like below
DT_Input(0)("DestinationTime") = DestinationTime

in above (0) represent the very first row and (“DestinationTime”) represent the column where needs to be updated.

With this solution i get:
image

I would like to get the 3 times in the column time.

you want to update same time for all of the rows…? or it is going to be different for each row.

So the Bot types first City A and then City B in Google Maps. Then a Get Text activity gets the “Time”.

I want that for all the 3 different distances, 3 different times.

in your case you must be having loop on datatable. Then you can use below
CurrentRow("Distance") = DestinationTime
my assumption is your code kind of looks like below

for each CurrentRow in DT_Input
 >>Navigate to google maps
 >>Enter City A and City B
 >>Extract Time and assign to variable DestinationTime
now use assign activty >> CurrentRow("DestinationTime") = DestinationTime
next CurrentRow

Thanks a lot!

CurrentRow(“DestinationTime”) = DestinationTime

This was the solution.

1 Like

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