KAPOW

Welcome to the Kapow forum. Here you can get help, use your skills to help others and enjoy hanging out in the company of other Kapow Robot Developers.


Number of iterations

Share
avatar
Bobi

Posts : 8
Points : 189
Join date : 2018-10-01

Number of iterations

Post by Bobi on Tue Oct 16, 2018 2:45 pm

I use For Each in DA. How to exit the loop on 4 iterations?
pavel.vraj
pavel.vraj

Posts : 86
Points : 959
Join date : 2016-11-04
Location : Prague, Czech Republic

Re: Number of iterations

Post by pavel.vraj on Tue Oct 16, 2018 2:58 pm

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
avatar
Bobi

Posts : 8
Points : 189
Join date : 2018-10-01

Re: Number of iterations

Post by Bobi on Tue Oct 16, 2018 3:06 pm

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
What step(element) to use to exit the loop?
Shyam Kumar
Shyam Kumar
Ranks

Posts : 108
Points : 2270
Join date : 2013-07-05
Location : Kerala, India

Re: Number of iterations

Post by Shyam Kumar on Tue Oct 16, 2018 4:16 pm

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

Sponsored content

Re: Number of iterations

Post by Sponsored content


    Current date/time is Thu Mar 21, 2019 9:51 pm