Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
rcandeo
Creator III
Creator III

How to make a double selection using a macro?

I have a macro that makes an initial selection in my application that is like this:

ActiveDocument.GetField("Group").Select ("MDF")

I need to select "MDF" group and either "PBO" group, but I don't know how to do this.

1 Solution

Accepted Solutions
johnw
Champion III
Champion III

Bah, that'll teach me to extrapolate from SelectValues, for which that parameter tells it to be in toggle mode. Actually READING the API guide now, it looks like you want to use ToggleSelect. So like this:

set field = ActiveDocument.getField("Group")

field.Select("MDF") 'wipes out current selections and then selects MDF

field.ToggleSelect("PBO") 'toggles the selection of PBO, which turns it on without touching MDF

View solution in original post

3 Replies
johnw
Champion III
Champion III

set field = ActiveDocument.getField("Group")

field.Select("MDF") 'wipes out current selections and then selects MDF

field.Select("PBO"),true 'leaves current selections and selects PBO

rcandeo
Creator III
Creator III
Author

It Did not work. PBO only appears, as "true" clause is not being recognized

johnw
Champion III
Champion III

Bah, that'll teach me to extrapolate from SelectValues, for which that parameter tells it to be in toggle mode. Actually READING the API guide now, it looks like you want to use ToggleSelect. So like this:

set field = ActiveDocument.getField("Group")

field.Select("MDF") 'wipes out current selections and then selects MDF

field.ToggleSelect("PBO") 'toggles the selection of PBO, which turns it on without touching MDF