Skip to main content
Announcements
Get Ready. A New Qlik Learning Experience is Coming February 17! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
dkbhatt51
Contributor III
Contributor III

Autoreload on opening

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.

1 Solution

Accepted Solutions
Miguel_Angel_Baeyens

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.

Miguel Angel Baeyens

BI Consultant

Comex Grupo Ibérica

View solution in original post

7 Replies
kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

   It works at my side.

   Can you describe what happens your side.

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
dkbhatt51
Contributor III
Contributor III
Author

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

Miguel_Angel_Baeyens

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.

Miguel Angel Baeyens

BI Consultant

Comex Grupo Ibérica

dkbhatt51
Contributor III
Contributor III
Author

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

Miguel_Angel_Baeyens

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.

Miguel Angel Baeyens

BI Consultant

Comex Grupo Ibérica

dkbhatt51
Contributor III
Contributor III
Author

Thanks Miguel -  With the macro allowed 'system access' it works fine.

I was being foolishly careful not allowing system access 🙂

Miguel_Angel_Baeyens

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.

Miguel Angel Baeyens

BI Consultant

Comex Grupo Ibérica