LOOPER v2 not working correctly when started from step enter trigger

:smiley: No it’s not your fault.
It is simply a disabled functionality on our instance.

There we go… the default value of your counter is already 1 !
This will call the second value by the first iteration.
If you would go a step back after the first run and go to the looper step a second time, it would run normally.

Try setting the counter to 0 by default!

In my case it works (I still use the fixed looper v2 version…)

There we go… the default value of your counter is already 1 !

Yes, I know. I have already expressed that myself.
image

Try setting the counter to 0 by default!

Yes I know it will solve the problem.
But I do not see anywhere in the explanation of the LOOPER v3 that this prop should be 0 when the loop starts.

I think Tulip should revise the LOOPER v3 to add that to the description, and also add this code in the beginning of getValue(“Begin Loop”, (value)=>{…

if(0 != getValue("Iteration")){
   fireEvent("Error", "Iteration not zero");
   return;
}

To be precise, the check should be added only if the “Begin Loop” is true

getValue("Begin Loop", (value) => {
  //  setValue("Iteration", 0);
  if (value == true && value != undefined) {
     if( (0 != getValue("Iteration")) ){
        fireEvent("Error", "Iteration not zero");
        return;
     }
     ...

Thank you.
That is a good feature, and it seems to be done by the “setValue(“Iteration”, 0)” when the “Begin Loop” becomes false.

Therefore, I should not have commented out that part.

getValue("Begin Loop", (value) => {
  setValue("Iteration", 0); 
  if (value == true && value != undefined) {
     // The setValue("Iteration", 0) just above is asynchronous, so we have to make sure "Iteration" is actually zero before starting the loop.
     if( (0 != getValue("Iteration")) ){
        fireEvent("Error", "Iteration not zero");
        return;
     }
     ...

@Mihaly

I have a question on “Looper v3 - Unit Test” App

What is the intention of storing “yes” in the “Begin Loop” variable at the “Setup Looper” ?

Shoudn’t this be “no” ? (So that we could start looping when entering the step “Step enter -test”)

Great question!

You’re right in observing that the Begin Loop variable is preset to "yes" in the “Setup Looper” step. The intention behind this is to preconfigure all necessary parameters — including setting Begin Loopbefore entering the step where the actual loop runs (i.e., “Step enter - test”).

This design helps demonstrate how to start the looper without needing additional triggers in the looping step itself. While it’s technically possible to initialize everything within a single step, we chose to split the setup and execution to highlight how a looper can be started automatically and cleanly, once conditions are prepared.

That said, you can absolutely adapt the logic to start with Begin Loop = "no" and then trigger it conditionally — it depends on your use case.

Hope this clarifies the reasoning!

Best,
Mihály (Tulip)

Dear Mihaly-san,
Thank you for updating the Looper.

The updated “LOOPER v3.1” seems fine!