Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
avastani
Partner - Creator III
Partner - Creator III

Call Macro from Load Script

Hi,

I have a macro that receives the values from variables set in the load script. Is there a way to call that macro from the load script?

I tried

LET a = myMacroCall();

and also tried

Table:

LOAD myMacroCall() as A

AUTOGENERATE(1);

neither seemed to work.

The macro receives the variables, passes it to in soap request and then stores the response into a temp XML file that is then reloaded into the app and finally calls another macro to remove the temp XML file.

Function myMacroCall

     Set fromDate = ActiveDocument.Variables("vFromDate")

     Set toDate = ActiveDocument.Variables("vToDate")

... do processing

.. output to XML file

End Function

4 Replies
Not applicable

Maybe youd could try to use the OnPostReload trigger.

avastani
Partner - Creator III
Partner - Creator III
Author

OnPostReload cannot run from Publisher I believe

Not applicable

Maybe should check this topic:

http://community.qlik.com/thread/12166

avastani
Partner - Creator III
Partner - Creator III
Author

that is a very simple example, if i add variables to it, it doesn't work