Decoupling and refreshing KPI Cards
RéponduI have developed a series of KPI cards that use Arcade to directly pull information from the Portal Item. Two issues with KPI cards I am tripping over and looking for workarounds:
- KPI cards are directly tied to the map. While I can initialize KPI cards using a startup Workflow, if a user clicks on the map it affects the KPI cards. I want to break this connection and loosely couple the data.
- The Portal Item is updated continuously and the values in the KPI cards need to reflect these changes. Is there a way to auto-refresh without the use of a browser extension?
-
Hi Tom - if you haven't already figured this out.
The default template contains a few references to kpi.display so that for most folks when they add kpi cards common actions like identify and map clicking refresh them automatically. If you remove those kpi.display commands, you should be able to refresh the kpi cards only when you choose to.
The current pattern for auto-refresh is to start a client-side workflow on startup that has a polling loop with a delay that will wake up periodically and perform its actions. Most often used for auto-refreshing map data, but should work for your kpi card use case as well. Usual caveats apply on finding the right frequency so that things appear responsive in the UI without causing undue performance strain.
0 -
Hey Tom - Any chance you could share a few Arcade samples? Everything I try keeps throwing the following:
“Cannot exit advanced mode: unsupported Arcade script”
I've tried something as simple a the following:
var x = 5; var y = 10;
var result = x * y;
return result; // Returns 50
And no go.
Thanks in advance!0
Vous devez vous connecter pour laisser un commentaire.
Commentaires
2 commentaires