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

Always one selected value or non-selected in Field

Hi all,

Is there a way to configure a field to only allow user to select one value at each time? 

I came across "always one selected" in field settings but this option does not have the flexibility to not select anything at all for the field.

Any idea how can we allow user to select only one value for the specific field, and also allows the user to remove this field selection?

Thanks and regards,
Arthur Fong

 

 

2 Solutions

Accepted Solutions
Or
MVP
MVP

Nothing that I am able to share.

Scriptside, CONCATENATE OriginalTable Load * INLINE [

MyDimension

Please Select Value ];

Object-side, e.g.

if(myDimension = 'Please Select Value',

Sum({<myDimension = >}myMeasure),

Sum(myMeasure) )

View solution in original post

Arthur_Fong
Partner - Specialist III
Partner - Specialist III
Author

Hi @Or ,

Thanks for the idea provided.
Gave me an idea on how to proceed with the Script and Front End Expression.

Refer sample app attached as reference.

View solution in original post

6 Replies
ArnadoSandoval
Specialist II
Specialist II

Hi @Arthur_Fong 

Yes there is a way to restrict a field to a single selection, take a look at this Set the Always one selected value 

Hope this helps,

Arnaldo Sandoval
A journey of a thousand miles begins with a single step.
Arthur_Fong
Partner - Specialist III
Partner - Specialist III
Author

This will not allow user to deselect the specific field.

Thanks.

Or
MVP
MVP

By definition, "Only one selected value" requires one selected value meaning it can't be de-selected.

Some extensions will allow you to set a filter to only allow one selection, without actually enabling Qlik's "Always one selected value" option. However, if a user accesses this field from another source, e.g. the "Selections" screen or smart search or current selections, they will be able to select multiple values or no values at all.

We've worked around this by concatenating the text value "Please select one value" or "Default" or "All" into our field and setting that as a default value for Always One Selected. Our objects then have a calculation condition which requires the user select a value as appropriate (that is, objects which require this selections will not load if the selection is "Please select one value", but you could also set your formulas to ignore this selection, e.g. if our field is  Country, then selecting "All" will make the formula select all countries, and if any other value is selected it will respect the selected value. 

Arthur_Fong
Partner - Specialist III
Partner - Specialist III
Author

You have a sample app on this?

Or
MVP
MVP

Nothing that I am able to share.

Scriptside, CONCATENATE OriginalTable Load * INLINE [

MyDimension

Please Select Value ];

Object-side, e.g.

if(myDimension = 'Please Select Value',

Sum({<myDimension = >}myMeasure),

Sum(myMeasure) )

Arthur_Fong
Partner - Specialist III
Partner - Specialist III
Author

Hi @Or ,

Thanks for the idea provided.
Gave me an idea on how to proceed with the Script and Front End Expression.

Refer sample app attached as reference.