Macro syntax to edit a variable's OnChange properties (trigger)
Could anyone please provide the correct macro syntax to edit the properties for a variable's OnChange action trigger? I am trying to create the correct macro syntax to disable, and later re-enable a variable's OnChange action under Document Properties.
A customer has a macro to automate some actions, and during macro execution, a variable OnChange trigger is being executed between each step, resulting in long macro execution time.
And yes the customer realizes they should be using built-in actions rather than a macro, but at this point in time, the customer has a macro and it needs to be optimized.
The attached QVW shows a rough approximation of the customer's QVW, with a variable OnChange trigger being executed multiple times over the course of macro execution.
So far, I was able to modify the macro code to successfully delete the variable's OnChange action on the first step of the script, and later recreate the action at the end of the script. However, when this task gets executed, the OnChange properties for the variable event trigger gets cleared. I've tried looking at the QlikView API Guide for the correct syntax, but I was unable to locate anything to edit the properties for an OnChange action. If anyone could please send along the macro command to modify the properties for an event trigger, it would be much appreciated!
set v = ActiveDocument.Variables("vBadVariable") prop = v.GetProperties ' msgbox prop.OnChangeActionItems.Item(0).type
set actionsvar=prop.OnChangeActionItems actionsvar.RemoveAt(0)