I use For Each in DA. How to exit the loop on 4 iterations?
3 posters
Number of iterations
pavel.vraj- Posts : 86
Points : 3025
Join date : 2016-11-04
Location : Prague, Czech Republic
- Post n°2
Re: Number of iterations
Hi,
use a variable, which you increase on each iteration and then test the variable. In case it equals required count of iterations you place an exit from the loop.
BR, Pavel
use a variable, which you increase on each iteration and then test the variable. In case it equals required count of iterations you place an exit from the loop.
BR, Pavel
Bobi- Posts : 29
Points : 2300
Join date : 2018-10-01
- Post n°3
Re: Number of iterations
What step(element) to use to exit the loop?pavel.vraj wrote:Hi,
use a variable, which you increase on each iteration and then test the variable. In case it equals required count of iterations you place an exit from the loop.
BR, Pavel
Shyam Kumar- Ranks
- Posts : 113
Points : 4344
Join date : 2013-07-05
Location : Kerala, India
- Post n°4
Re: Number of iterations
You can take the iteration of the loop using 'Get Iteration' action step in a variable, and test the iteration ("Test Variables" action step) is equal to 4 (Here you can choose any operator like =,<>,<,>,<=,>=,contains, not contains etc for the testing purpose) and if the condition is satisfied you can do the as specified under error handling,In the Error handling tab you can choose break loop to break the loop.
Thank you
Regards,
Shyam kumar
Thank you
Regards,
Shyam kumar