Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
PradeepReddy
Specialist II
Specialist II

Issue in GetFieldSelections()

Hi All,

I am facing an issue. In my application there is one List box (Country) , and a Text Box. 

Here I want to check the country "USA" is existing in the current selections are not. Here is the result I am getting.

1) When I select  All Countries/Individuals thru Check Boxes it is giving correct result.

2) When I give the "*" in search option, instead of All selections, it is giving "0" instead of "1"

In text box I have taken bellow expression.

Expression: =Wildmatch(GetFieldSelections(Country,'|'),"*USA*")

Please see the attached application.

Thanks,

Pradeep

7 Replies
Chanty4u
MVP
MVP

sunny_talwar

What if you use this instead:

=If(GetSelectedCount(Country) > 0, Wildmatch(Concat(DISTINCT Country,'|'),'*USA*'))

PradeepReddy
Specialist II
Specialist II
Author

there is no issue in  syntax, it is working properly, but functionality failed in one scenario, which I mention earlier.

I am using alternate states to give an idea about my problem to the community.

PradeepReddy
Specialist II
Specialist II
Author

But my doubt is, "When we give * instead of making all selections thru check boxes, it is showing * only, instead of all country names." why this is happening like this?

rubenmarin

Seems GetFieldSelections priorizes the searched text (it retuns '*' or '***'), meanwhile concat is using only field values.

PradeepReddy
Specialist II
Specialist II
Author

here '*' means 'ALL' right?. Then it has to take all country names like 'USA|UK|INDIA|CANADA'

rubenmarin

In my post '*' means the string '*', is what GetFieldSelections returns if you select the values using '*' in the search tab. So GetFieldSelections() seems to return what you exactly used to select values.

Meanwhile Concat() seems to use the possible values after selections have applied, doesn't matters how that values where selected or in wich field.