Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Is there a way to check if an item is selected when you've selected multiple items in the field?
For example, let's I have a field with values 1-10. I know that if I only have one selection made, I can use GetFieldSelection. If I want to see if 4 was selected, I can use if(GetFieldSelections(num)=4,True)
What if I've selected values 1,2,3,4,5? I can't use the same logic. Is there anything I can use to see if 4 was selected?
Hi,
Use SubStringCount() or WildMatch()
Like
if(SubStringCount(GetFieldSelections(num,'|'),'4')>0,1)
or
if(WildMatch(4,$(=GetFieldSelections(num,','))),1)
Hi, use this:
=if(findoneof(GetCurrentSelections(yourField),'4')>0, 'true','false')
Hi,
Use SubStringCount() or WildMatch()
Like
if(SubStringCount(GetFieldSelections(num,'|'),'4')>0,1)
or
if(WildMatch(4,$(=GetFieldSelections(num,','))),1)
SubStringCount seems to be doing what I want, but I still have a small problem. In the example I gave, there was only a small data set. In my actual data, there are many more values, and there might be a large amount of selections. In GetFieldSelections, when you get above a certain number of selections, it doesn't list each one - it might say '20 of 300'. Is there a way to make it give the full list?
Hi,
Yes.Then you have to specify the max number of selections
GetFieldSelections(num,'|',100) here i assumed you have list box with 100 values.
Celambarasan
Hi,
try this:
getselectedcount(YOURFIELD)
it gives you the number of field selected.