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: 
oxiofrt
Partner - Creator
Partner - Creator

Macro to get selected values in a variable

Hi,
my application is containing several listboxes. I would like to have a variable SELECTED_VALUES which would contain all selected values in those listboxes.

Principa would be that each time a value is selected in any of these listboxes, variable would take its previous value ('' at the beginning) concatenated to the new selection operated. That is to say that the order the user is selecting value in the listboxes has to be taken into account.

Herejoined is an application that should make the understanding of the matter easier.

Thanks a lot for your help, it aims to provide disable people to express by themselves better.

1 Solution

Accepted Solutions
markmccoid
Partner - Creator II
Partner - Creator II

Hi,

I've attached the example again and extended it to the first two list boxes. You would just need to create a macro for each of the list boxes and set the Macros to fire when the OnSelect event is triggered for each field.

Hope this helps.

View solution in original post

4 Replies
markmccoid
Partner - Creator II
Partner - Creator II

Hi,

I'm not exactly sure what you were looking for, but I modified your attached application to show one way I might accomplish this.

I just set this up to work with the first list box, but you could extend it to others.

First, I made the listbox so only one value could be selected at a time. Then I created a Macro called AppendtoVar and set it to fire whenever the Qui field had a OnSelect event happen.

The ClearVar button will clear the variable.

I'm sure there are issues to work out and this may not be what you need, but thought it might help you in some way.

oxiofrt
Partner - Creator
Partner - Creator
Author

That's it !

Only missing thing would be to be able to select values in each listboxes and not the first one (Qui?).

Is is possible ?

Thanks a lot for your help !

markmccoid
Partner - Creator II
Partner - Creator II

Hi,

I've attached the example again and extended it to the first two list boxes. You would just need to create a macro for each of the list boxes and set the Macros to fire when the OnSelect event is triggered for each field.

Hope this helps.

oxiofrt
Partner - Creator
Partner - Creator
Author

Thanks a lot for your help, it's just what I was waiting for.

GREAT

Big Smile