on ‎2021 Jun 17 2:12 PM
Hello folks,
I'm wondering if there is a way how to determine with a code to wait/pause until the widgets are fully loaded and then continue?
In more detail: I want to run at the end of my function the code "Application.hideBusyIndicator()", but for this I have to determine somehow when the load is finished.
Any hints/suggestions would be appreciated.
Thanks.
Peter
Request clarification before answering.
Then maybe add check for isEmpty() for datasource before the hideBusyIndicator()?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
What will be incorrect if you do something like this?
Application.showBusyIndicator('Data is loading');
Table_1.getDataSource().getResultSet(); // one || more sources
Application.hideBusyIndicator();
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Aleksey,
thanks for your reply!
My dataset in quite large (with some extra calculations, exception aggregations, etc... in the live model). The problem is, that the code is quicker/finishes earlier than the widgets are fully loaded.
The impact is that the 'busyIndicator' is hidden earlier than expected.
Hi Peter,
Have you found a soluation for this? I have a similar requirments but the busy indicator disapear before the widgets is fully loaded.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi sanpe,
The background is that widget refresh operations are delayed and bundled at the end of the script, but this means any call hiding the loading indicator before will be too early. Have you tried the automatic loading indicator yet? It is exactly build for such cases (I admit it might have some weaknesses still).
Depending on your scenario you could try enforcing the update during the script using Application.refreshData and passing the array of data sources to refresh (important!). But I would not recommend this as a general purpose apporach as it by-passes the builtin optimzation mechanisms.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Bob
Is there any document that explains how this bundling works (Live connection BW)?
I would like to complete simple scenario:
1.Add dimension to table
2.Read resultset to get member Id of a new dimension
It surprised me that read resultset is not waiting for the previous action on table to finish and it returns incomplete data...
even calling getDataSource().refreshdata after every table modification doesn't help.
The only workaround was to add a loop between action 1 and 2 that delays things by some artificial operations-which is super ugly solution...
Regards
Rafa
Hi rafal.skorupa, I think it is outlined to some degree in the performance chapter of the Analytics Designer handbook. In your simple case (not using background loading or pause refresh) adding dimension to table is not loading the data immediately. This allows you to add or remove more dimensions/measures in the same script without the overhead of loading the result on each step. Reading the result set then does trigger the load and waits until it completed.
Hi bob.meincke
More detailed scenario I described here:
https://answers.sap.com/questions/13665522/live-connection-resultset-issue.html
Is it really by design like this?
regards
Rafał
Hi Bob,
The automatic "Loading Indicator Settings" in Global Settings only activates when first loading the story.
How do we trigger this when the user makes a change in a table, & all calculated members are calculating and refreshing?
I have an issue where users are changing data in a table & clicking a data action before calculated members have finished updating, causing data issues.
In the past I've had to estimate load times - not ideal but.
Also used stuff like checking result sets and using timers to delay things.
Application.showBusyIndicator("Loading");
var LEN = Chart_1.getDataSource().getResultSet().length;
if(LEN>0)
{HIDE_LOAD.start(1);}//HIDE_LOAD contains the code ---
Application.hideBusyIndicator();
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 7 | |
| 6 | |
| 6 | |
| 4 | |
| 4 | |
| 3 | |
| 3 | |
| 3 | |
| 3 | |
| 3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.