So, it was looking something like this in my head. When you drag one of these for each loops designed for the flowchart, you would be given two separate activities, one beginning and one end. Whatever is between those two will be the loop. Basically the body of the for each will be a flowchart instead of a sequence.
When I was first learning, I would try to loop through items using Decisions and a counter. The logic needed for this was basically consistent but very cluttered, and also can cause some issues where you might not be processing the correct item due to the use of a counter.
While a For each activity for use in a Flowchart could be interesting and something I also pushed for a while ago, it really isn’t needed to be honest, because For each steps are a section of a process; something that should be organized separate from the other portions of the Flowchart.
What I mean by that is, you can place a For each box in your Flow Chart, then delete the Body box in the For each and replace with a Flow chart box, then maximize the Flow Chart in the For each. Now, you have a Flow Chart that is performed in a For each step; now, you can process all your items in a more organized method.
I was thinking the same thing as you mentioned. Use counters and loop the flow. Count the total of row first, and start the loop from bottom of the data table.
After finished 1 loop, minus counter by 1. And once counter equals to 0, close the loop.
That would loop your items in reverse which works if that’s what you want, but you can also do the same thing starting with counter = 0 or -1. Then, do counter+1 and have a Decision that checks if the index is > the rows or items count to exit loop.
Although, I switched to using For eaches like I presented above (and to organize the process better), because I got exhausted with all the clutter of performing a simple loop, and would need to help explain it to my colleagues whenever they need to understand it or develop their own loop.
I am curious @ClaytonM liske this example , if we use a flowchart in for each loop, the bot performs an activity if true and if false i want the bot to go to the next entry in for each loop, so in that case I dont define anything in false and it would automaticaly perform for the nextone ?
Yep, if I understand you correctly. Essentially, the For Each is going to iterate each item, so if your Flowchart (inside the For Each), ends… as in gets to the last activity where no arrow is directed at another activity… then it goes to next iteration.