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

Liste box with one selection possible

Hi

How can i have a liste box with one selection possible ?

i found a qw file (in attachement) with what im trying to do, but i don't know how it has ben done

Thx

7 Replies
simondachstr
Luminary Alumni
Luminary Alumni

Select one value -> right click -> check "Always one selected value"

?!

mohamed_ahid
Partner - Specialist
Partner - Specialist
Author

Thx but this is not what im seeking for , because if i do like you said there will be always one value selected even when i push clear  button .

What i want is a list (simple not multiple ) which dont let the user to choose multiple values but only one (see the attachement).

Not applicable

try this

Go to the List Box properties and under the Field column dropdown, Select Expression.

Add expression as:

=aggr(only({<fieldname-={123}>}fieldname),fieldname)

mohamed_ahid
Partner - Specialist
Partner - Specialist
Author

thx but unfortunally i'm using an expression rather than a filed .

Not applicable

Here's a solution using if/match. If I understood correctly you want to limit the list box on one selection. For example, if you wanted to limit the list box to only show 2008, you could do the following:

=if(match(Year, 2008)>0, ''2008)

Hope that helps.

Matt

mohamed_ahid
Partner - Specialist
Partner - Specialist
Author

what i need is to limit year fild by diplaying only the last three years , but i need also to limit selection on on one value and if it's possible to have a default one (already selected when i start my document)

dmohanty
Partner - Specialist
Partner - Specialist

Hi Ahid,

Go to Document Properties>>Triggers>>Field Event Triggers>> OnSelect >> Edit Actions >> Add "Select in Field" in Actions.

Put the below expression in the Serach String:

 

=

If(GetSelectedCount(Year), Max(Year))

Field: Year