Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Append to a list box action

Hi,

This is the current behaviour of a button Selection action :

"Select in Field" action : clears the current selection of the target list box and then adds the search string to it.

"Toggle Select" action: , toggles the target box selection state of the search string.

But, there is no "Append Select" to append the search string to the existing selection of the target list box. Is there a workaround?

1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

Hi,

you can use this expression in a select in field action:

= chr(40) &  concat(distinct YourField, '|'  ) & '|YourValue' &chr(41)

Best Regards

Stefan

View solution in original post

5 Replies
Anonymous
Not applicable
Author

Hi,

you can use this expression in a select in field action:

= chr(40) &  concat(distinct YourField, '|'  ) & '|YourValue' &chr(41)

Best Regards

Stefan

Not applicable
Author

Thank You. After tweaking it a bit to fit my app it worked great.

Not applicable
Author

Hi,

I just noticed that YourField returns all possible values if nothing is already selected in the target list. So when something is added to the list for the first time, everything becomes green (selected). I tried to replace YourField with GetFieldSelections(YourField) function but that does not work. Here is my actual button Search String:

=chr(40) &  concat(distinct  replace(store_name,store_name,'"'&store_name&'"'), '|'  ) & '|' & '$(vAddToStores)' &chr(41)

Is there a simple solution for this?

Anonymous
Not applicable
Author

Hi,

This should work:

= If(getselectedcount (store_name)> 0,chr(40) &  concat(distinct  replace(store_name,store_name,'"'&store_name&'"'), '|'  ) & '|' & '$(vAddToStores)' &chr(41))

Best regards

Stefan

Not applicable
Author

yes, it does. Thank you.