Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I am trying to assign multiple field values from a ListBox to a variable using a macro.
Consequently I used:
ActiveDocument.Evaluate("GetFieldSelections([Source Choice] , ',' 99)")
However when I lookup the relevant variable in the list of QlikView variables, there is nothing assigned (only '-' ).
The above function works for single selection fields though.
What needs to be changed in the syntax ?
Another issue with the above function is that when I deselect the field values, the relevant varaiable still contains the last selection.
Why does the GetFieldSelections function, not read a "null" field selection ?
Also instead of always declaring variables in QlikView then importing them into the macro editor, I tried:
Set SourcChoiceValue = SourceChoiceTemp = ActiveDocument.Evaluate("GetFieldSelections([Source Choice])")
I get an objectb type error though whether or not I include the leading 'Set' keyword.
What needs to be changed ?
Thanks in advance
Why are you using a macro instead of a field OnSelect trigger to set the variable? It's much easier to add a Set Variable action with your variable as target and GetFieldSelections([Source Choice] , ',' 99) as value. The OnSelect trigger action will also clear you variable if you clear the selections.
Nulls cannot be selected in Qlikview, so getfieldselections can't ever contain a null.
Why are you using a macro instead of a field OnSelect trigger to set the variable? It's much easier to add a Set Variable action with your variable as target and GetFieldSelections([Source Choice] , ',' 99) as value. The OnSelect trigger action will also clear you variable if you clear the selections.
Nulls cannot be selected in Qlikview, so getfieldselections can't ever contain a null.