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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Executing Subroutine from Load script

 

Hello,

I have a subroutine and several functions, which I have coded in the Edit Module window. The subroutine follows the below format: 

SUB exportToExcel_v2

     [Code

           ...

           ...

           ...

           ...

     ]

END SUB

While I am able to assign this subroutine to a button, and have the subroutine execute when a user clicks on the button, I wondered if there was a way to have the subroutine automatically execute when a user Reloads the LOAD script?

I have been trying to find a solution online and in the reference manual, but I cannot seem to find a concrete answer.

I would really appreciate any assistance with this issue.

Labels (1)
1 Solution

Accepted Solutions
trdandamudi
Master II
Master II

May be this:

Go to

Setting-->Document Property-->Trigger-->Select On Post Reload-->Click on Add Button on right side

then add Action as Run Macro --> YourMacroName

View solution in original post

3 Replies
trdandamudi
Master II
Master II

May be this:

Go to

Setting-->Document Property-->Trigger-->Select On Post Reload-->Click on Add Button on right side

then add Action as Run Macro --> YourMacroName

Anonymous
Not applicable
Author

This was exactly what I was looking for--adding a reload 'Trigger' had not crossed my mind.

Thank you!

krishnacbe
Partner - Specialist III
Partner - Specialist III

Hi,

Please try executing the script below using button event trigger to reload()

LOAD *;
SQL EXEC [SubRoutine Name];

Regards

Krishnapriya