Invoking macros
You can invoke different types triggers as macros for document, field, variable, sheet and button events.
Invoking macros on document, field and variable events
To invoke macros on document events, field events and variable events, open Document Properties and then select the Triggers tab.
From the Add Action dialog you find actions that runs a macro among the external action types.
Document Event Triggers
In this group you can set macros to trigger on selected events in the document.
Trigger ID | Trigger description |
---|---|
OnAnySelect | A run macro action, if added, will be executed each time a selection has been made in any field of the QlikView document. |
OnOpen | A run macro action, if added, will be executed each time the QlikView document is opened. |
OnPostReduceData | A run macro action, if added, will be executed after each time the Reduce Data command has been executed. |
OnPostReload | A run macro action, if added, will be executed each time the script has been re-executed. |
Field Event Triggers
In this group you can set macros to trigger on changes in the logical state of a specified field in the application. You must first select a field in the list before you may assign macros to events in it.
Trigger ID | Trigger description |
---|---|
OnSelect | A run macro action, if added, will be executed each time a selection has been made in the selected field. |
OnChange | A run macro action, if added, will be executed each time a selection has been made in any field which is logically associated with the selected field. |
OnLock | A run macro action, if added, will be executed each time the field is locked. |
OnUnlock | A run macro action, if added, will be executed each time the field is unlocked. |
Variable Event Triggers
In this group you can set macros to trigger on changes in the contents of a specified variable in the document. You must first select a variable in the list before you may assign macros to events in it.
Trigger ID | Trigger description |
---|---|
OnInput | A run macro action, if added, will be executed each time a new value is directly entered in the selected variable. |
OnChange | A run macro action, if added, will be executed each time the value of the selected variable changes as a result of changes in other variables or the logical state of the application (typically applies when the variable contains a formula). |
Invoking macros on sheet events
To invoke macros on sheet events, open Sheet Properties and then select the Triggers tab.
From the Add Action dialog you find actions that runs a macro among the external action types.
Sheet Event Triggers
In this group you can set macros to trigger on change of active sheet.
Trigger ID | Trigger description |
---|---|
OnActivateSheet | In this dropdown list you can select from existing macro names or type any name which you later create a macro for in the Edit Module dialog. The macro, if it exists will be executed each time the sheet is activated. |
OnLeaveSheet | In this dropdown list you can select from existing macro names or type any name which you later create a macro for in the Edit Module dialog. The macro, if it exists will be executed each time the sheet is deactivated. |
Invoking macros with sheet object buttons
To invoke macros on sheet object button events, open Button Properties and then select the Actions tab.
From the Add Action dialog you find actions that runs a macro among the external action types.
Macro property ID | Macro property description |
---|---|
MacroName | In this textbox you input any existing macro names or type any name which you later create a macro for in the Edit Module dialog. The macro, if it exists will be executed when the button is pressed. |