Qlik Community

QlikView Extensions

Discussion Board for collaboration on QlikView Extensions.

Highlighted
bitzt496
New Contributor

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
Partner
Partner

Re: How to prevent extension autoreload?

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

bitzt694
New Contributor

Re: How to prevent extension autoreload?

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?

Partner
Partner

Re: How to prevent extension autoreload?

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.

Partner
Partner

Re: How to prevent extension autoreload?

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.

Re: How to prevent extension autoreload?

Did you get any solution or workaround to this issue?