Aggregations Loading / Refreshing

Hi, I’m wondering if anyone knows:

  1. Order of operations in terms of when a Query/Aggregation is loaded on App Started
  2. When Aggregations are refreshed (specifically if an input values changes)
  3. If any subsequent triggers are delayed until the aggregation is loaded/refreshed aka. is it sequential or do aggregations run in parallel to triggers
  4. When an aggregation is refreshed, is it refreshed fully before presenting results or could it provide partial results while it continues to index through the table

These are questions I have always wondered but todays specific issue: I have the following Query in my app that has a single filter based on a table record. The input is from a table record which is loaded during an On App Started trigger.

I have a simple Aggregation on the Query to provide the unique record IDs for the results of the query.
image

On the first step in the app there is a button that when clicked stores the IDs from the Aggregation into a Variable.

I know when the app first loads the aggregation will show all Record IDs as the table record had not yet been loaded and thus the filter is null. I was hopeful that the aggregation would refresh once the table record was loaded during On Step Started BEFORE the user would ever have a chance to click the button.

However, it appears that a user may have clicked this button so quick that the Query had not yet refreshed based on the new table record input and thus stored ALL record IDs from the table into the variable instead of a filtered list.

I can think of many work arounds to ensure the aggregations are fully loaded/filtered before copying to a variable, but I don’t want to make changes if I don’t need to (or don’t understand the problem fully)

In an older release, I had success with a similar issue (wherein elements were not refreshing during step-looping) by creating a small delay by adding a trigger to play a sound, or display a message, or execute one or more extra step transitions.

You could also force a delay by using a timer as the only transition from the app start step to the step where the user makes the selection.

1 Like