Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
The #1 reason QlikView customers adopt Qlik Sense is a desire for a modern BI experience. Read More
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Creator II
Creator II

Single Selct List Box

Hi all,

Greetings.

I have one list box called Market. I want to make it single selection.

I made it by :

But in this way , user cant clear this field. It is becoming mandatory.

User want this should be optional as well as Single Select.

Could you please help me how to do this.

Thanks,

Sarif

1 Solution

Accepted Solutions
Highlighted
MVP & Luminary
MVP & Luminary

Re: Single Selct List Box

Your expression returns 1 or 0. Unless you have a field named 1 or 0 in your data model nothing will happen. Make your expression return a field name instead: =if(GetSelectedCount(Market)>0,'Market')


talk is cheap, supply exceeds demand

View solution in original post

8 Replies
Highlighted
Champion III
Champion III

Re: Single Selct List Box

try with  document trigger with

onopen/onselect  along wth on change   clear field 

Highlighted
MVP & Luminary
MVP & Luminary

Re: Single Selct List Box

That's not possible. It can be both optional and Always One Selected Values. Always actually does mean always.

If you want you can add some black magick and add a Select in Field trigger with an action that clears the field if more than one value is selected. You can use the GetSelectedCount() function to check the number of selected values.


talk is cheap, supply exceeds demand
Highlighted
Creator II
Creator II

Re: Single Selct List Box

in that way also it is becoming multi select.

I want to restrict this to single select.

Highlighted

Re: Single Selct List Box

It would be more useful if you can describe what selection behavior you want to support in this listbox.

Remember that clearing a field often means "Select Everything" (even though values go all white instead of green) which is the exact opposite of "Select exactly one".

Highlighted
Creator II
Creator II

Re: Single Selct List Box

Hi ,

I am using below expression, but it is not working.

=if(GetSelectedCount(Market)>0,0,1)

Highlighted
MVP & Luminary
MVP & Luminary

Re: Single Selct List Box

Your expression returns 1 or 0. Unless you have a field named 1 or 0 in your data model nothing will happen. Make your expression return a field name instead: =if(GetSelectedCount(Market)>0,'Market')


talk is cheap, supply exceeds demand

View solution in original post

Highlighted
Creator II
Creator II

Re: Single Selct List Box

hi Gysbert,

I have one question,

In the expression why we need to put Market as Text? I tried with field, it is not working though.

Just want to clarify my concept.

Thanks,

Sarif

Highlighted
MVP & Luminary
MVP & Luminary

Re: Single Selct List Box

If you put the field in instead of as text it will try to get a value from the field instead of using the field name


talk is cheap, supply exceeds demand