Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

Not applicable

Multiple listbox with always one value selected

Hi all,

I am trying to implement a feature in which we have two list box, based on selection of one list box the other list box data filters out. Based on the selection of the second listbox the charts are plotted. The problem is the charts are irrelevant if none of the values in the second listbox are selected. So there has to be a default value selected for both the listbox at any time.

If we transition from one value to another of the first listbox, corresponding value in the second listbox changes and a default value is also selected.

I have attached a file as a sample. Please suggest me a method to implement the same. Thank you

1 Solution

Accepted Solutions
MVP
MVP

Re: Multiple listbox with always one value selected

Is this something you could use?

I selected one value in the "Level" listbox and then turned on "Always One Selected Value"

For a value to be default for "Level Values" I simply let the minimum string of "Level Values" be the default - because he regular "Always on Selected Value" doesn't work when the data is associated in the way they are here.

The Default (not listbox - it only looks like one...) is constructed with a correctly formatted Text Box so it will display that the default (selected) value is - and the chart will use the MinString ... with a Set Expression to pick it out.

2015-05-01 #3.PNG

9 Replies
awhitfield
Esteemed Contributor

Re: Multiple listbox with always one value selected

HI Abinav,

Select one item in the list box, then Open properties and tick the option 'Always One Value Selected' on the General Tab. Repeat this for the second list box.

See Amended dashboard attached.

Andy

MVP
MVP

Re: Multiple listbox with always one value selected

Is this something you could use?

I selected one value in the "Level" listbox and then turned on "Always One Selected Value"

For a value to be default for "Level Values" I simply let the minimum string of "Level Values" be the default - because he regular "Always on Selected Value" doesn't work when the data is associated in the way they are here.

The Default (not listbox - it only looks like one...) is constructed with a correctly formatted Text Box so it will display that the default (selected) value is - and the chart will use the MinString ... with a Set Expression to pick it out.

2015-05-01 #3.PNG

Gabriel
Valued Contributor II

Re: Multiple listbox with always one value selected

Hi,


I assume you want to have 2nd listbox to show all value even when something is  selected, right?

Not applicable

Re: Multiple listbox with always one value selected

Hi Andrew,

Thank you for responding. I already tried that. The problem is if i am selecting " always one selected" in the second listbox then the first list box is not working properly.

Also, I want all the item to be displayed in the second listbox at any time.

Not applicable

Re: Multiple listbox with always one value selected

Thank You Petter for the solution. I think this will work. 

Just one thing, is it possible that we can also have the default value selected in the "level value" listbox?

Not applicable

Re: Multiple listbox with always one value selected

Yes Gabriel, i want to show all the values even when one value is selected.

Not applicable

Re: Multiple listbox with always one value selected

Hi Petter,

Thank you for your help. I am still facing an issue. I can still select multiple values in the second listbox. Can you please suggest any alternative of that. Thank You.

Gabriel
Valued Contributor II

Re: Multiple listbox with always one value selected

Hi,

But you have marked this question as answer.

Probably best to open another question

MVP
MVP

Re: Multiple listbox with always one value selected

There are a couple of ways of getting around that - although selecting multiple can't be prevented - but it can be fixed immediately by some adjustments....

The best might be to:

Create a Trigger on the dimension_value field and let that trigger select the MinString(dimension_value) so only one value will be selected as a result...

Community Browser