Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

How to prevent extension autoreload?

I'd like to make an extension where I can save multiple sets of data as a PDF. To accomplish that, I have to cache data in a QV variable, and select different data sets. But every time I use _this.Data.ClearSelections();, _this.Data.SearchColumn(0, email, true); or doc.SetVariable("remainingEntries", JSON.stringify(remaininEntries)); it reloads the extension and starts over the script, even tho I want to execute something else after changing the selection. Is there a fix to it? Or is there at least a way to save variables without qlikview reloading my extension? The Variable should be able to survive reloads, and should be able to be accessed by other extensions.

Thanks in advance.

5 Replies
ThomasGorr
Partner - Contributor III
Partner - Contributor III

You could hold a state with a variable in global state (cache, sessionstorage, window-object) to flag if the extension should do a repaint or not.

Then as a very first logic in your extension you do something like this:

if(reloadDisabled){

     return;

}

// else do all the extension stuff

Anonymous
Not applicable
Author

Thanks for your reply, but I still can't get it working. Return only works in functions, and the Extension reloads anyways, because the Qva.AddExtension(...) gets executed on every change.

You got any other ideas?

ThomasGorr
Partner - Contributor III
Partner - Contributor III

Well maybe you could provide your extension code and a QVW here to get more detailled insights of what you're doing. Maybe I could implement the solution for you then.

ThomasGorr
Partner - Contributor III
Partner - Contributor III

Btw.: Have you tried to hold a global variable which is out of scope of Qva.AddExtension(...)? You could implement your cached data there and set a handler inside the Qva.AddExtension(...)-Scope to clear your cache as needed.

Miguel_Angel_Baeyens

Did you get any solution or workaround to this issue?