Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
Not applicable

GetFieldSelections Issue

I am using GetFieldSelections to determine if a specific value of a field is selected. This works great when there are only a few values selected, but for some reason when I select more than 5 or 6 values for that specific field, Qlikview stops recognizing individual value selections and the GetFieldSelections logic no longer works. Has anyone run into this issue before? If so what is the solution?

This is my logic (I'm turning buttons different colors based off of whether or not a field value is selected):

if(GetFieldSelections([Year]) like '*2008*', rgb(32,200,53), rgb(196,0,0))

Thank you.

3 Replies
vgutkovsky
Honored Contributor II

Re: GetFieldSelections Issue

GetFieldSelections can take several parameters. The second parameter is the separator and the 3rd parameters is the maximum number of values displayed before it turns into just a count of the values. So you can do getfieldselections(Year,';',9999). Or you can switch to the concat() function, which doesn't have a limit, but also doesn't check if zero values are selected (i.e. 0 values is the same as all values). The syntax you could use for that is: getselectedcount(Year)>0 and substringcount(concat(distinct Year),'2008')>0

Regards,

Vlad

sasikanth
Valued Contributor III

Re: GetFieldSelections Issue

hi

Try some thing like this

if(getSelectedCount(year)>0 and wildmatch(year,'*2008*), rgb(32,200,53), rgb(196,0,0))

Not applicable

Re: GetFieldSelections Issue

For some reason I can never get wildmatch to work. It doesn't work in this case either. Not sure what I'm doing wrong.

Community Browser