Loop Iterator - issue with advanced conditions

The overall context is that I’m looping through a set of items and using an API Query to retrieve 1:many inventory data. I’m first doing a query to scalar in order to establish the max item number ${itemid_current_max}, and my intention is for the loop to stop when it iterates past that number.

Both environment variables are numeric. I have confirmed (via debugging w/ python) that ${itemid_current_max} is being set correctly to a value of 157139. . However, the loop isn’t stopping when ${itemid_min} increments beyond the ${itemid_current_max} value, it just carries on all the way to the End Value of 200000.

Am I doing something wrong here?

Hello @chris.odell1617208923357

Thank you for your post and question. I had a look at this with our team, and they have advised that you can achieve this as per my screenshots below:


I should note that when using advanced mode, the syntax is slightly different, for example, being jv_start >= jv_max

I hope this helps, please let me know how you get on.

Kind regards, Joe

Hi Joe, thanks for the reply! The difference in syntax when invoking the variables in advanced condition mode was my problem, and now it’s fixed!

So just “jv_start” not ${jv_start} is what you need for this particular circumstance. Appreciate the help!

Hi @chris.odell1617208923357

That is brilliant news, if you need anything else, please do not hesitate to ask.

Kind regards, Joe