cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
momolopu
Helper I
Helper I

Restart a loop

Hello, is there any way to restart a loop? I mean you are for example in the middle of the loop and you want to go back to the beginning of the loop.

 

How could this be done? If you could put me some image please, I am very novice with this program.

 

Thank you very much for your time.

2 REPLIES 2
ryule
Skilled Sharer
Skilled Sharer

Yes, you can create a label and put it right before the loop, then use Go to Label. You'd obviously need it in a conditional or some kind of indicator to restart the loop. And you'll also want to be careful with this, as it could create an infinite loop, like my example is below.

ryule_1-1659995202395.png

 

 

Ryule beat me to this; this was going to be my recommendation as well.

 

To prevent a runoff loop, set variable %LoopAttempt% to 0.  At the beginning of the loop, set variable %LoopAttempt% to %LoopAttempt + 1%.  Then have an If %LoopAttempt% > X (number of attempts you want), then "Exit Loop".  This will prevent a runoff and let you have control of how many loops it can attempt by simply defining X.

 

Good luck!

Helpful resources

Announcements
October Events

Mark Your Calendars

So many events happening this month - don't miss out!

 WHAT’S NEXT AT MICROSOFT IGNITE 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Register for a Free Workshop.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Users online (2,926)