The REST API I am testing has a slow return of JSON data for the report I am retrieving.
It can take 1 min or more to get the data.
I have two identical pages using List Component to display the data when it arrives using the web page emulator. When I click navigation to go to the page, I get a blank screen area where the list component would display until the data arrives.
- Is there a cache option to load the list component with stale data until the new data arrives?
- What event should I use to display a spinner, or better yet, a countdown to the user until the data arrives?
Also until I added a set appvar with the datavar logic, I would not get any data. I am not using the appvar but it would not work without setting an appvar. Reference With the 4.x runtime the global page does not load data into a collection variable | Voters | AppGyver
Hmm, have you checked if the rest api call fails once before trying again, or just takes a long time the first time?
- You could cache using local storage – there are a lot of threads on this on the forums linking to each other, you could start looking into it e.g. from here Local storage usage
- Instead of an event, I would hide a spinner after the “get collection” flow finishes
Hmm, would it be possible to get the data in batches by using paging or similar?
Data variable content is lost when page is removed from stack (in web every time page is left and in mobile when you go back from the page, and each data variable exists only on that page, so an app variable should be used. Sounds like there is some kind of a schema mismatch – you can try to find the difference between the schemas and fix it, or just populate the data variable from the app variable via formula (ignoring the warning that schema does not match).
The API finest resolution is 1 hr of data. Don’t ask why it just is and it creates a lot of data. Slow to update.
I have put it in to an appvar with a 5 min update timer on the global canvas. Then I only use the appvar and formulas in the rest of the app. Real time data still lags but not the access to the appvar. I don’t see any way to reduce the amount of data.
We can close this one.