Qlik Community

Ask a Question

App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

Announcements
April 22, 2PM EST: Learn about GeoOperations in Qlik Sense SaaS READ MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
rachel_delany
Creator
Creator

App reload widget

I'm trying to develop a simple widget for users to be able to reload an app through clicking a button.

The widget is really simple, just using the app.doReload() method.

It works when the app is not published however when the app is published, it appears to work (the data reloads) however once you refresh the page the new data is no longer there.

It appears the app isn't saving after reload, if I add a separate button which invokes the app.doSave() method, it all seems to work. Does anyone know how I can put this all into one button?

 

6 Replies
avinashjpm
Contributor II
Contributor II

Hi Rachel,

Have you found the solution for this? 

We are facing the same problem.

durgesh22
Contributor III
Contributor III

<lui-button ng-click="app.doReload();app.doSave()">Reload app</lui-button>

 

Use above it should work.

rachel_delany
Creator
Creator
Author

No, I had already tried that but the save does not work on a published app.

rachel_delany
Creator
Creator
Author

No, haven't found a solution.

Current thinking is we need to make an extension that will trigger the reload task for the app.

peachman
Contributor III
Contributor III

this wont work because app.doReload() returns a promise, You need to call a .then on it

 

app.doReload().then(function(){
   app.doSave();
});

 this will wait for the reload. then do the save once its reloaded. 

pwagner
Partner
Partner

Hello @peachman 

where do I have to put your code into the widget HTML?

At the moment I have two buttons:

pwagner_0-1621417131475.png

Could you give us an example how the HTML code in the widget should look like?

 

Thank you.
Best regards, Patrick