Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
gerhardl
Creator II
Creator II

OnOpen Trigger - macro not working

Hi There,

I have a document with OnOpen triggers.

There are a few triggers, 3 that run macros to create excel reports, and 3 that run macro reloads, saves and quits the document.

The first excel report macros run perfectly, then when the 3rd one runs it opens the Edit Module and then just hangs there. There is no error message. If I click on Okay it then skips that macro and go on with the others (saves and quits).

I can run this macro from a button with no problems.

Any ideas on why this would happen?

I also have another document that should Open, Reload, Save and Quit. It works 95% of the time - but occasionally it just opens and triggers nothing.

I open both these files from a windows batch file.

I feel like the OnOpen triggers are very unreliable... I have no other explantion for why it would only work sometimes..

Any ideas?

G

13 Replies
marcus_sommer

I work not with PowerShell and have thought the syntax is the same as batch, but perhaps a start-parameter is set as default and another parameter can added.

Otherwise Utsav had right, the security settings from module must allow extern access.

- Marcus

Not applicable

Hi, i too faced same kind of situation what you explained while using multiple macro calls in  OnOpen trigger.

I had just added extra line in macro i.e; ActiveDocument.GetApplication.WaitForIdle then it got resolved my problem.

So in your case just add the macro line "ActiveDocument.GetApplication.WaitForIdle" above your "Reload" line in 3rd macro.

I hope it will helps you. Plz let me know if that works for you.

Regards,

Satish.A

Not applicable

What client are you using, when open? AJAX or plugin?

vardhancse
Specialist III
Specialist III

Ajax or else IE plugIn.

Because only in IE plugin mode the macros will work.