Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Reference http://community.qlik.com/thread/8543 regarding autoreload on opening. It works if the qvw document is opened manually but it does not seem work if the file is opened through another qvw document via a button. Am I doing something wrong? Thank in advance for the help.
Hello Darshan,
Nope, the Personal Edition doesn't have any limitation other than opening files developed by another people. Is your macro allowed to system access? You will need that.
A very simple example is working in my side (one button that opens another file that reloads), so the scenario works
Hope that helps.
BI Consultant
Hi,
It works at my side.
Can you describe what happens your side.
Regards,
Kaushik Solanki
Hi Kaushik,
Thanks for the prompt response.
In the qvw1 document I have several buttons to export certain selected field parameters. The last button is to open the qvw2 document after I have exported the data to skv files. The requirement is to reload qvw2 with the fresh data in skv files.
I tried to put the macro in the qvw1 file after ‘open qvw2’ – it opens the qvw2 but I have to manually reload it. I also put the macro in qvw2 as directed in the community but it does not reload automatically.
Much appreciate your help.
Darshan Bhatt, MD, M.Phil.
Consultant: Patient Safety & Pharmacovigilance
Hello Darshan,
The code for autoreloading should be in QVW2, because when the file is opened, macro stops execution in QVW1 (unless you change your code).
So QVW1 should just open the QVW2 file, and in the Settings menu, Document Properties, Triggers, OnOpen and insert the name of the macro, in the QVW2 to reload it. You may refine it a bit so it only reloads when it's called from QVW1, likely using a variable or something.
Hope that helps.
BI Consultant
Dear Miguel, I did just that - QVW1 opens QVW2 via the button. QVW2 has the trigger as suggested - OnOpen (<has action>)
sub autoreload
activeDocument.reload
end sub
But for some reason it does not reload QVW2.
Is it because I am using personal edition?
Many thanks for your response.
Darshan
Hello Darshan,
Nope, the Personal Edition doesn't have any limitation other than opening files developed by another people. Is your macro allowed to system access? You will need that.
A very simple example is working in my side (one button that opens another file that reloads), so the scenario works
Hope that helps.
BI Consultant
Thanks Miguel - With the macro allowed 'system access' it works fine.
I was being foolishly careful not allowing system access 🙂
Glad to help.
For what it's worth, the explanation of that need is that when the file reloads, rewrites the file on the hard disk, as opposed to other macros that don't (changing colors or visibility of the charts).
Regards.
BI Consultant