• Instructions to Ask a Question

    For any assistance, please click the "Ask a Question" button and select the Pabbly product for which you require support.

    We offer seven comprehensive applications designed to help you efficiently manage and grow your business:

    Our support team endeavors to respond within 24 business hours (Monday to Friday, 10:00 AM to 6:00 PM IST). We appreciate your understanding and patience.

    🚀 Exclusive Lifetime Offers 🚀

    We invite you to take advantage of our special one-time payment plans, providing lifetime access to select applications:

    • 🔥 Pabbly Connect — Lifetime Access for $249View Offer
    • 🔥 Pabbly Subscription Billing — Lifetime Access for $249View Offer

    Make a one-time investment and enjoy the advantages of robust business management tools for years to come.

Iterator and Counter

HelpMeLearn

Member
Your Task History ID
IjU3NmQwNTZjMDYzMDA0MzU1MjY0NTUzMDUxMzQ1MTY3NTQzOSI_3D_pc, IjU3NmQwNTZjMDYzMDA0MzU1MjY0NTUzMjUxMzI1MTYyNTQzNyI_3D_pc
I'm trying to get my iterator to run a step after the iterator has run through its array. I have a counter that identifies the number of instances it will run, and each execution will deduct 1 from the counter's value.

My first run for the workflow works correctly. However, subsequent runs of the same workflow do not because the counter goes negative even though I've set it to "Reset Counter After Reaching Certain Final Value" to 0. This shouldn't be the case because my counter should result in 0 every time it runs.

If I manually reset the counter to 0 after each workflow, then it works. This isn't ideal nor feasible.

Why does this happen, and how can it be fixed?

I've included two workflow histories. The first being the one that runs correctly, and the second is where the counter goes negative (hence, my after-iterator step does not run).
 

Attachments

  • Iterator and Counter.png
    Iterator and Counter.png
    145.7 KB · Views: 85
D

Deleted member 15445

Guest
Hey @HelpMeLearn

We tried testing your Counter and it works perfectly now as you want. Let us know if you made any changes in the Counter step.

1719314382145.png


It can be possible that the changes you made were not saved in your workflow. This issue can be due to the collected cache in your browser. On Windows, pressing Ctrl+Shift+R will clear the cache, which should resolve any search issues. For Mac users, the equivalent command is Command+Shift+R.

Let us know if this works for you.
 

HelpMeLearn

Member
Hey @HelpMeLearn

We tried testing your Counter and it works perfectly now as you want. Let us know if you made any changes in the Counter step.

View attachment 43859

It can be possible that the changes you made were not saved in your workflow. This issue can be due to the collected cache in your browser. On Windows, pressing Ctrl+Shift+R will clear the cache, which should resolve any search issues. For Mac users, the equivalent command is Command+Shift+R.

Let us know if this works for you.

Thank you for your reply. I had the exact setting before & I've cleared the cache as you've advised. No changes were made. The problem still persists, and the counter is not resetting at 0.

My test can be observed in this workflow: IjU3NmQwNTZjMDYzMTA0MzI1MjZhNTUzNTUxMzY1MTZiNTQzMSI_3D_pc
 

HelpMeLearn

Member
Hey @HelpMeLearn

After reviewing your workflow and testing it ourselves, everything appears to be functioning correctly. We encountered no issues during any of the executions. Please consult this video for reference - https://www.loom.com/share/fa6aaaa983cd4f60bb4b1b9bd37a3d21?sid=8a3582b6-590a-497c-93cd-be7f9cd0819d

Let us know if you face the same issue again.

Thank you for the video and for your efforts.
I understand that your test shows that there were no issues. I have tried it myself a number of times, and I saw the same results. However, after running the workflow from my trigger, this happens.

3 - 1 shouldn't be -1.

The problem is still there when I run the workflow. The newest try is here: IjU3NmQwNTZmMDYzNjA0M2Q1MjY5NTUzNTUxMzI1MTYzNTQzNyI_3D_pc

Is my logic for the workflow correct?
 

Attachments

  • Iterator and Counter Issue.png
    Iterator and Counter Issue.png
    83.5 KB · Views: 79
D

Deleted member 15445

Guest
Hey @HelpMeLearn

It seems that our technical team needs to investigate this issue. Your concern has been forwarded, and we kindly ask for your patience as we address it. We will notify you once the issue is resolved.
 
D

Deleted member 15445

Guest
Hey @HelpMeLearn

The issue is fixed. Kindly delete the counter step and set it up once again in your workflow.

Please let us know if it works for you.
 

HelpMeLearn

Member
I've heeded your advice. Deleted & re-created the counter step. Unfortunately, I believe the problem still persists. Could we check it again?

The workflow's task history ID: IjU3NmQwNTZmMDYzMTA0MzM1MjZlNTUzMzUxMzM1MTZhNTQzMSI_3D_pc
 

Attachments

  • Pabbly Counter.png
    Pabbly Counter.png
    117.7 KB · Views: 78
D

Deleted member 15445

Guest
Hey @HelpMeLearn

After examining your workflow thoroughly and conducting extensive testing, it appears that the 'Counter' operates in a specific manner.

It halts at the final execution and resumes from that point, irrespective of the current row being entered. This is precisely why it yields a value different from the previous iteration's output.

1720009714917.png

1720009729350.png
 

HelpMeLearn

Member
Hey @HelpMeLearn

After examining your workflow thoroughly and conducting extensive testing, it appears that the 'Counter' operates in a specific manner.

It halts at the final execution and resumes from that point, irrespective of the current row being entered. This is precisely why it yields a value different from the previous iteration's output.

View attachment 44307
View attachment 44308

I have an idea of what you're trying to say, but I'm not sure how to work with this for my use case.

What can I do if I would like it to count & deduct exactly my number of row entries and restart the counter back at the next number of rows detected from the array for the next workflow?

For example, first run has four row entries. After the iterator completes all four, the counter goes to 0. The second run has two row entries, and after executing the array, it returns back to 0.
 
D

Deleted member 15445

Guest
Hey @HelpMeLearn

Unfortunately, this is not possible because the counter will not function that way. However, if you can design a Python or JS code for this task, you can integrate it into your workflow using "Code by Pabbly." You can find instructions for doing so here. -

 
Top