3 Replies Latest reply: Jul 1, 2014 1:09 PM by Matt Maino RSS

    GetFieldSelections Issue

    Matt Maino

      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.

        • Re: GetFieldSelections Issue
          Vlad Gutkovsky

          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




          • Re: GetFieldSelections Issue
            sasi k


            Try some thing like this

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