KAPOW

Would you like to react to this message? Create an account in a few clicks or log in to continue.
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.


3 posters

    Number of iterations

    avatar
    Bobi


    Posts : 29
    Points : 2098
    Join date : 2018-10-01

    Number of iterations Empty Number of iterations

    Post by Bobi 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 : 2823
    Join date : 2016-11-04
    Location : Prague, Czech Republic

    Number of iterations Empty Re: Number of iterations

    Post by pavel.vraj 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 : 29
    Points : 2098
    Join date : 2018-10-01

    Number of iterations Empty Re: Number of iterations

    Post by Bobi 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 : 113
    Points : 4142
    Join date : 2013-07-05
    Location : Kerala, India

    Number of iterations Empty Re: Number of iterations

    Post by Shyam Kumar 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


    Number of iterations Empty Re: Number of iterations

    Post by Sponsored content


      Current date/time is Sat Apr 27, 2024 3:24 pm