How to use "For each row" function


#1

hi all, I am currently watching the video about importing data from csv to online portal. However, I cannot proceed on “For each row” function.

when I put “data.Rows”, it said Compiler error (blue exclamation mark). further, I saw “For Each Row” is different from “For Each Row in Datatable” in the video. may I know if they are sharing the same function? thanks


#2

Hi @MichaelC,
First of all kindly check if you are using the For each row activity instead For each activity and when you are using the For each row activity you just need to pass the datatable as parameter.

But, it would be also be possible to work with the For each activity and here you pass datatable.rows as parameter and you would have to change the type parameter to DataRow and then it would work the same way.


#3

Hi MichaelC,

Acaciomelo solution should work. Please get back to us with the response.

For better understanding, I have attached the screenshots of both of them.

For each row… Iterates through all the row present in the data table However, For each iterates through the each element of an enumeration. Below is the screenshot of my artifact.

Regards,
Rahul


Error while passing datatable using invoke workflow
#4

Welcome Rahul :slight_smile: Now all assignments done ? :stuck_out_tongue: lol


#5

@aksh1yadav hehehe…! Thank you :slight_smile: