Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
mhmmd_srf
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
Gysbert_Wassenaar

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
Chanty4u
MVP
MVP

try with  document trigger with

onopen/onselect  along wth on change   clear field 

Gysbert_Wassenaar

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
mhmmd_srf
Creator II
Creator II
Author

in that way also it is becoming multi select.

I want to restrict this to single select.

Peter_Cammaert
Partner - Champion III
Partner - Champion III

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".

mhmmd_srf
Creator II
Creator II
Author

Hi ,

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

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

Gysbert_Wassenaar

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
mhmmd_srf
Creator II
Creator II
Author

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

Gysbert_Wassenaar

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