How to break the Iterator? How many steps are iterated/looped after the 'Iterator' action?
Status: Closed · Asked by Tanya Saxena on · 0 views
I have created one 'Iterator' action in Pabbly Connect, and now I've 5 different steps/actions just after this 'Iterator' action/step in my workflow. So will it loop/iterate through just 1 action just after the 'Iterator' action or all 5 actions just after the 'Iterator' action will be iterated?
How can I come out of the loop/iteration? If I just wanna iterate through 2 actions and then come out of the loop/iteration and normally proceed with the rest 3 actions. Is there an action like 'Break'?
Hey @Tanya Saxena
I have created one 'Iterator' action in Pabbly Connect, and now I've 5 different steps/actions just after this 'Iterator' action/step in my workflow. So will it loop/iterate through just 1 action just after the 'Iterator' action or all 5 actions just after the 'Iterator' action will be iterated?
For a better understanding of the Iterator action step, you can refer to the following video tutorial.
youtube.com/watch?v=zJaGQ-SIB0I
How can I come out of the loop/iteration? If I just wanna iterate through 2 actions and then come out of the loop/iteration and normally proceed with the rest 3 actions. Is there an action like 'Break'?
Further, the iteration of the execution cannot be broken but you may control it once by adding a filter action step afterward.
Hello @Supreme
Could expand a bit on the iterations? I have watched the video again and I am not quite sure of the number of Action Steps that are executed after the Iterator. Does it run in iteration mode for any step that uses iterated data?
Thanks,
Mickael
Hey @aoris
If you have n number of entries in the JSON array coming from the application, it will run n times after the Iterator action step and the action step used afterward.
So, if you are having 2 more action steps after the Iterator action step in your workflow and you have 5 entries coming from Google Sheets, it will take 5*2 tasks with the addition of the action step used before.
Oh, interesting, thank you. So to summarize:
- Iterator controls the data used for the iterations, including the number of iterations based on the data (assuming 5 entries)
- Step 1 after the iterator step will run 5 times.
- Step 2 after the iterator step will run 5 times.
- Step 3 after the iterator step will run once.
Correct?
More precisely -
- Iterator controls the data used for the iterations, including the number of iterations based on the data (assuming 5 entries)
- Step 1 after the iterator step will run 5 tasks.
- Step 2 after the iterator step will run 5 tasks.
- Step 3 after the iterator step will run once.
Thank you @Supreme !!
It might be worth pinning that information to the forum. It's super useful to use the Iterator properly.
Have a good one,
Aoris