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

Select at least one value in the list box and multi selections

Hi, I am just wondering if there's a way where I can prevent the user to do the "Clear all selections" but at the same time they will be able to do multi selection. For example list box for Months (January until December), I want the user to be able to select January, February and March but they won't be able to do "Clear all selection", at least one value has to be selected.

Thanks in advance!

11 Replies
Not applicable
Author

Hi.

U can create a button for this,

In the text part u can write as 'Clear All' but in the Actions,u can Choose Clear Other fields.

Then In the Field : Month

In this way whenever u will click on this button then all the other fields will get cleared but ur selection for the Month will remain the same.

Anonymous
Not applicable
Author

Can you explain why you want this?

The reason I ask this is because I think there is a beter way to work with problems coming from No-selections.

Not applicable
Author

Dennis, because the calculation between Month and YTD is different. If the user do "Clear all selections" for Month filter, it will show YTD data incorrectly.

Erika, when I click on the month that I selected, I am still able to uncheck all the months. I want to have at least one month selected and also be able to select more than one months.

I hope this makes sense.

Thank you

matt_crowther
Luminary Alumni
Luminary Alumni

I may be missing something here but can you use the following:

Create a listbox with your required dimension, make a single selection then under Properties>General check the 'Always One Selected Value' - this means there will always be one or more values selected in the listbox even when the user presses clear.

Hope that helps,

Matt - Visual Analytics Ltd

Anonymous
Not applicable
Author

I disagree Matt,

This will make it Only One value selectable, not more then one.

Properties>General check the 'Always One Selected Value' - this means there will always be one or more values selected in the listbox even when the user presses clear.

Anonymous
Not applicable
Author

Dennis, because the calculation between Month and YTD is different. If the user do "Clear all selections" for Month filter, it will show YTD data incorrectly.

Maybe it would be easier to find the reason of this incorrect YTD data?
What happens when you select something else? I mean is the incorrect YTD only when you "clear all"?

And is it correct when you select "any field" ?

Not applicable
Author

Yes the "Always One Selected Value" only select one at a time, I can't do multi selection with the shift key buttons.

Anonymous
Not applicable
Author

An other Question about this: Is your calculation correct when you select ALL Months?

matt_crowther
Luminary Alumni
Luminary Alumni

Dennis,

You're entirely correct - it's been a long day! I use that all the time to limit listboxes to single values but for some reason decided to forget that fact for today.

All the best,

Matt