Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Variable as drop down list values in input box

Hi.

I want to have an input box with a predefined drop down list showing values, (e.g. Product1, Product2, Product3).

Entering:    Product1;Product2;Product3    in the Contraints tab, listed values of the input box works.

i.e. We see:

Product1

Product2

Product3

However, I want this list to be dynamic, so I have stored the values in a variable  vCurrentProductList.

When I have this:   vCurrentProductList = 'Product1;Product2;Product3'

and I put =vCurrentProductList in the Inputbox Contraints, listed values - the drop down doesn't work. It shows them all in 1 line:

Product1;Product2;Product3.

How can I use the variable to get a result like this instead:

Product1

Product2

Product3

Thank you.

3 Replies
ashfaq_haseeb
Champion III
Champion III

Hi,

look at the attached.

Regards

ASHFAQ

Not applicable
Author

Try using the following formula:

=Concat( {1} DISTINCT vCurrentProductList, ',' , vCurrentProductList)

It should list them in a column sorted ascending by vCurrentProductList.  If the comma for the second parameter doesn't work, try a semicolon.

sabirguiri
Contributor
Contributor

Try this:

=Concat( {1} DISTINCT YearWeekNumber,'|',YearWeekNumber)

Replace the YearWeekNumber with your column header title name.