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

Set default field selection using variable - possible??

Hi,

I want to write a macro which will do two things:

1. Clear all selections (I know how to do).

2. Set a field selection based on the content of a variable.

    Example: I want to do something like this

    set = vYearSel = '2016'      -> in load script

    ActiveDocument.Fields("year").Select $(vYearSel)     -> in macro.

When I ran it, the macro failed to parse.   If I hardcode the value in the macro, it will work which isn't what  I want.

Anyone know how I can accomplish this?

Thanks!!

Labels (1)
20 Replies
Anonymous
Not applicable
Author

As it turns out, restoring multiple values isn't so obviously when using Action -> Select in Field.  It specifically requires the format of (x|y).  I had to dip through many articles and finally found it.  But that's the QV requirement.