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:
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.