Is it possible to end the execution of a repeater through a condition?
For example, you will repeat 10 times. But, if the result is x. You stop repeating.
Is it possible to end the execution of a repeater through a condition?
For example, you will repeat 10 times. But, if the result is x. You stop repeating.
I would use magic variable methodology here>
Create a route where you only go here after you get result x then use set a variable module and x to anything.
Then I would use a get a variable after your repeater. use filter after it, filter = x does not exist. So then if you have a value for x meaning you met your condition the scenario will stop. However it will continue to loop through the repeater until the number of loops are done but it will not continue to any more modules.
Welcome to the Make community!
This has been asked several times before.
The only method closest to a do-while loop in programming in a Make scenario is a repeater-error.
For more information, see
Short answer:
You need to throw an error to get out of the “loop”.
There are two methods if you want to do a polling wait in the same/single scenario.
The simplest solution would be to use a Sleep module to wait out 5 minutes (or the longest period that the external service takes).
You could even use more than one, if you have a Make subscription (free tier max 5 minutes per scenario run).
This other method allows you to check multiple times at shorter intervals, because you “throw” an error to break from the repeater and end the scenario when successful/completed.
The secret is in the success check filter, the error handler, and the commit directive.
Hope this helps!
samliew – request private consultation
Join the Make Fans Discord server to chat with other makers!
Hi @Pedro_Vaz
The entire solution is covered in detail here.
Regards,
Msquare Automation - Gold Partner of Make
Visit us here | Youtube Channel