Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Announcements
Customers, Partners & Luminaries only: You're invited to a Data Analytics Roadmap session. Read More
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Not applicable

list box - how to force to choose only one value

Hello,

I have a list box with a set of values, and I want to force the user to choose only one at a time, not as many as he wants, how can I do this?

Thanks

Alexandra

16 Replies
Highlighted
Specialist
Specialist

Hi alexandra,

Select a value in the list box & then go in Properties - > General Tab , there is a property "AtLeast one selected value" check that, which will force user to select at least one value at a time.

Regards

AmarSmile

Highlighted
Not applicable

Thank you for your reply Amar, but I don't want to force the user to select at least one value, he can choose no value at all, I just don't want him to choose more than one. And that option is greyed out...

Thanks

Highlighted
Partner
Partner

This Box is selectible if you have selected only one value from the list.

Highlighted
Not applicable

Hi andrus,

See, I have only one value selected from the list and still the option is greyed out...

Highlighted
Partner
Partner

Hi,

Seems, that parameter doesn't work for expressions, but only for "regular" fields:-(

Highlighted
Not applicable

Oh.... that's probably it... I'm not sure I can do it without being an expression though...

Thanks for your help

Highlighted
Partner
Partner

Hi!

But maybe you can add this expression into your loading script.

Highlighted
Champion III
Champion III

You cannot use "Always One..." in a calculated list box, but you can apply it to the underlying field, the one that you use in the expression.

Highlighted
MVP
MVP

So you want either 0 or 1 value to be selected, but never more than one? Here's an example of using a macro to do it. If more than one value is selected, it immediately deselects all but the first selected value. There might be a better way than using a macro, and for this specific case, there's probably a simpler macro (this was adapted from a macro to allow 1 to 5 values to be selected).