The new looper widget appears to be missing loop steps

I’ve been working on an app that’ll be run daily to sync over unsynced work order table data to Snowflake.

Due to the limited ability to loop in apps, I decided to use the new looper widget. At first blush, everything appeared to be fine. I had it looping through unsynced work orders and saving their data over to Snowflake.

We ran into an issue, however, where some table values may be blank. Our Snowflake person was able to use the NVL function to avoid issues with some data types, but for whatever reason floats, dates and ints were still an issue.

So, for the affected fields, I created variables in my app, then added logic that stores a default value if the table field is blank, and stores the table data to the variable if it’s not blank.

After a lot of testing and digging when this didn’t work, I found that for some reason, the looper widget is seemingly not performing this logic on some of these steps. Some of them just don’t appear to be firing.

I took a record where the fields in question weren’t blank and set up a new step that displays the field data as well as the local app variables. It contains the same logic as the looper widget for determining the value of the local app vars, and runs successfully:

However, those same vars, using the same logic as in the looper widget, are remaining at their default values (or null if a default value is not specified) when the logic is run through the looper widget:

image

I’ve quadruple checked the logic to ensure that it matches with the first example and can confirm that none of the steps in the looper widget are disabled.

Hopefully that made sense, but I can clarify if needed.

Thank you.

Just messaged you to see if I can get the link to the instance/step for troubleshooting.

Was there a resolution to this? I am using the Looper widget and have encountered similarly unpredictable behavior, although in my case this leads to the Looper erroring out immediately during some executions and functioning without issue on other executions.

Hi Chris - Welcome to Tulip Community! :tada:

I believe this question was with v1 of the looper widget and we are now on v2. That being said, I want to know more about the issues you are having, what type of error are you seeing? How are you using the looper (for example, on step enter trigger?). Any additional info you can provide will help us debug further!

Hi Beth - I think I resolved the issue. I believe it was related to an “On Step Enter” trigger that was not reliably completing prior the first loop starting (there is a loop trigger that is dependent on the “Step Enter” trigger loading a table record). I resolved the issue by moving the “On Step Enter” trigger to the previous step as there was no reason the record couldn’t be loaded earlier.

I’m glad you were able to resolve this! Sounds like you should be all set, but don’t hesitate to reach out on Community again if you have additional questions int he future :slight_smile:

Hi @Beth.

We’ve been using the V1 Looper for awhile now. Is there a set of release notes for the changes between V1 and V2? I imagine they’d function similarly.

Should we switch to V2 as soon as possible?

Howdy @Preston!

We don’t have a set of release notes for the looper widget, but acknowledge that would be good to have and I have added that to our backlog of Knowledge base content :slight_smile:

We do recommend switching over the V2 looper widget as soon as possible. V2 has some improvements and fixes various inherent race conditions that were present in V1. Potentially you haven’t seen any of these in V1 so far, but as you expand uses cases, you may see more buggy behavior with V1 if that makes sense!

1 Like