I would like to know if it is possible to have some kind of option to “stop” looping through a for loop, whenever some condition is met.
The idea is to:
=> Perform an action ONCE, whenever a condition is met. The problem is that I can’t know if this condition will be met once, twice or many times while looping through a for loop.
Solution A: What would be optimal would be to have a variable (boolean) that takes the “true” value whenever the condition is met. Then at the end of the loop, the value is verified and an action is performed.
But Let variables cannot change their values in aql.
Solution B: Instead the for loop should stop looping whenever the condition is met, and then an action can be performed, once.
If none of the 2 options mentioned above are possible then my action would be performed a X unknown number of times through my for loop. Which can be a problem.
Unless there is some other third option to realize this? I wonder. Thanks
It’s strange, there is an error message about the any service not being found. I tried to simplify it fully in order to debug it, i removed the ToSring function and kept only an integer type variable.