Variable false 10 times consecutively

Hello guys,ia

I have a flow that checks if an element exists and I want after the variable is 10 times consecutively false to exit loop.

Anyone have an idea?

Thank you!

If I understood you correctly, you want to check if an element exists (check 10 times at most), and if that element does not exist, you want to break the parent loop. At this point, in my opinion, you’d use a nested loop.

Here are the steps to follow within your master loop:

  1. Create and initialize an ‘int’ (counter) variable with 0.
  2. Create and initialize a ‘bool’ (check if element exists) variable with false.
  3. Enter a while loop with a condition - counter <= 10.
  4. Check if the element exists; if it does then set ‘check’ to true and break the while loop otherwise increment the ‘counter’ variable.
  5. Within your master loop, check if the ‘check’ variable is true or false. If false, break the parent/ master loop otherwise continue your sequence.

I hope that makes sense.
Thank you!

Use RetryScope activity
Set the RetryNumber as per your requirement
Use Element Exists in the Condition section of RetryScope Activity.

Hope this helps you…