0

We have an Appian grid that shows all Appian tasks of a user. The corresponding data we obtain using queryProcessAnalytics(). How can we make this update automatically when the task status changes?

Currently, we have stored the result of queryProcessAnalytics() in a local variable and we set a!refreshVariables() to refresh this variable on every "user interaction" with refreshAlways: true. We also added a button Refresh that doesn't store anything away, but simply counts as a user interaction when it is clicked. The grid then refreshes automatically when the local variable with the data changes, because the grid is set to refresh when a used/dependent local variable has changed, which mainly means that the user is forced to click on Refresh to ensure to be up-to-date and see latest tasks.

We consider this a workaround as the refresh automatically on variable change in our understanding triggers refresh of local variable (and thus the grid) only once an another local variable changes, but does not trigger a refresh queryProcessAnalytics would suddenly throw a different result.

Any help towards a fully automatical solution is appreciated!

We searched the Appian community but to no avail. Most entries are rather old, e.g.

B--rian
  • 5,578
  • 10
  • 38
  • 89

1 Answers1

1

You should use refreshInterval within your a!refreshVariables()with value 0,5. It will refresh every 30 seconds. https://docs.appian.com/suite/help/21.3/fnc_evaluation_a_refreshvariable.html

Jakub
  • 91
  • 7
  • Is there a way to go below 30 seconds? The users keep complaining that they want to see their changes *immediately* (i.e. after at max 2s)... – B--rian Oct 18 '21 at 11:45
  • 1
    Yes and No :) I would combine both 'refreshInterval' and refresh every after user interaction. When user just sit and look at screen then data are refreshed every 30 seconds. If he/she use app then data are refreshed immediately. Please note that setting this up in this way may have negative impact on performance. – Jakub Oct 19 '21 at 12:26