I'm trying to change the CurrentLoopIteration value of an operator/loop but I'm getting an error saying that this is not possible because is a system value.
Does anyone have any tip to do it?
I give you an example of what I'm trying to do:
I want to loop an operator for 10 times, unless I get a specific result. In this case I want to change the CurrentLoopIteration to 10 to finish the loop.
From the documentation:
Repeat Count is a calculated field, so you can use a variable or expression to specify the count at run time. Repeat Count accepts the following value types:
I would suggest using a condition in the Repeat Count for this.
This is not how for loop works.
Your encountering a While loop case
You need to create an infinite while loop that relies on a boolean flag, as Lindsay_Estabrooks described.
You need an integer Process variable and a boolean Process variable.
In each loop iteration, implement this logic :
If specific result is obtained then change flag value
elseif counter is = to 10 then change flag value