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: 
jduenyas
Specialist
Specialist

Passing multiple values to a listbox

Hi all

How do I pass a list of multiple items to a list box?

I have a button that generates a list of months (YTD, or Last 12 months etc.) and I wish to pass them to a list box.

The list is delimited with a '|' (Pipe) and it is saved in a variable. If Pipe is not the right delimiter what should the delimiter be?

This is the list I have now in the variable:  Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct 

I then use "Select in Field" and set the Search string as the variable

I tried numeric values as well but no luck

1 Solution

Accepted Solutions
jduenyas
Specialist
Specialist
Author

OK I figured it out

The list should start with an opening Parenthesis and end with a closing parenthesis and the delimiter should be set to *|* (Star Pipe Star) The list should look like this:

(*Jan*|*Feb*|*....*|*Nov*|*Dec*)

View solution in original post

5 Replies
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

I believe you'll need parens around the string

(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct)


-Rob

jduenyas
Specialist
Specialist
Author

OK I figured it out

The list should start with an opening Parenthesis and end with a closing parenthesis and the delimiter should be set to *|* (Star Pipe Star) The list should look like this:

(*Jan*|*Feb*|*....*|*Nov*|*Dec*)

jduenyas
Specialist
Specialist
Author

Thanks Rob (I appreciate your replies to all, all the time)

See my reply to myself.

dmohanty
Partner - Specialist
Partner - Specialist

@rwunderlich  - hope you are good!

How to get the display in Current Selection Box as Jan, Feb, Mar, Apr etc. , instead of (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct) ? 

Just like regular List Box selection display. 

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

That just seems to be the way the selection is stored.  I don't know of any way around it.  The only workaround I can think of would be to make your own current selections display by using GetCurrentSelections and parsing the x|y values.  

-Rob