5 Replies Latest reply: May 17, 2017 1:30 PM by Daniel Langley RSS

    Using GetFieldSelections in Set Analysis

    Daniel Langley

      Hi everyone,


      My eyes are going crossed trying to figure this out. Please help!


      I have a filter pane (Occupation) that I want to use to dynamically create a set analysis filter.


      The following set statement is successful if I only select ONE value from my Occupation filter:


           count({<Occupation ={"$(=GetFieldSelections(Occupation,','))"}>}EMPLOYEE_COUNTER)

      However, if I select more than one value then it can't evaluate successfully because the filter string that's built is missing quotes (' ')....so I added the Chr(39) below but can't get it to work at all now


           count({<Occupation ={"$(=Chr(39)&GetFieldSelections(Occupation,Chr(39)& ','&Chr(39))&Chr(39))"}>}EMPLOYEE_COUNTER)


      The goal is to have a statement that looks like the follows after the user selects 'Doctor', 'Nurse', and 'Firefighter' from the Occupation filter.


      count({<Occupation = {'Doctor','Nurse','Firefighter'}>}EMPLOYEE_COUNTER)


      Or if you can think of a better way to do it in general than what I'm doing, I'm all ears as well.


      Thanks in advance!