Do While Error

If we think of it like a loop;
What should I do to say “do while” and "for each "return 5 times?

How to write return 5 times to the condition?

Hello @d.ulutas

You can refer to the below doc for do while. Same can be done with While loop also.
For each can bee used if you need to action on something from a list. For example if you have some 5 items, you can use for each to loop through each item and action.

in case we want repeat x times an action set we can do:

  • using repeat number of times activity
  • using for each activity | item in values Enumerable.Range(0,5)
  • doing it with a do while, but will additional implement the count increasement

Have fist check on repeat number of times activity

why do while is not found in studio x ? version i tried searching it but, its not available ??

Hello,

In studioX you don’t find while loop. You have to use loop ‘for each’ with high number of iterations and add if condition inside.

To loop 5 times in UiPath, use For Each with Enumerable.Range(1, 5) as the input, or use a Do While loop by initializing a counter (counter = 0), setting the condition to counter < 5, and incrementing the counter (counter = counter + 1) inside the loop. Both will ensure the loop executes exactly 5 times.