Hi, I have a for each activity in my workflow. There are 2 records in the datatable. Inside the for each there are activities which do the following
Find some data
Save the data to a variable (there are 3 pieces of data and 3 variables)
Write the data into a web form (3 fields)
Click a button
No I was under the impression that once these activities ended the flow would loop back and run again for the second record. This doesn’t seem to happen so am I using the correct method to loop through the data in the datatable?
If you are as allergic as I am to reading datatables during debug breakpoints (it’s a love-hate relationship between me and the UI) you can also just use a few extra write line commands as debug:
Writeline YourDatatable.rows.count.toString for the actual number of rows in your DT at that point.
To see the data, use Output Data Table to string and again a writeline to see the raw data.
Place both of them just before your for each row loop as evidence that the DT actually consists the data at the right time in your workflow.
A for each row in data table loop should then simply work, and display your row data with writeline row(n).toString with n being the column number.
No I didn’t. Just offering alternative approaches to help figure out the problem.
In my experience it helps to debug as close to the activity that displays the problem, that’s all.
I couldn’t tell at which point you performed your export to excel, and without knowing your exact workflow I couldn’t conclude if the data was manipulated unwillingly in between the steps, and didnt want to rely on assumptions.
Other than seeing your actual code (are you allowed to share your actual workflow with us?) I can’t think of a reason why a for each row workflow wouldn’t repeat itself if 2 rows exist in the DT. You screenshot example seems valid, other than the unfinished activities in it (which are obvious just there for example, I know)
I appreciate you looking, I still cant seem to put my finger on it but have different issue with a grid that is driving me nuts before I can test the whole For each.
I would share the workflow as its easier for everyone but i’m working on a remote machine with limited access