5 Replies Latest reply on Oct 25, 2018 8:19 AM by Caite Stevens

    ISMEMBEROF multiple groups & dimensions

    Caite Stevens

      I have one dashboard and I want many different groups of employees to access it.

      I don't want to use SERVER\CREATE USER FILTER because down the road I will have many dashboards and I don't want to have to maintain security on the dashboard level - too tedious.

       

      How do I use ISMEMBEROF to let 50 people access this dashboard, but:

      • The head of the Chicago office can only see all data where Office=Chicago
      • The head of the DC office can only see all data where Office=DC
      • Each individual employee can only see data where Employee=them

       

      I've been able to set this up with a single filter - i.e. the Chicago head can see Chicago folks, but because it's a filter, it means no one else can see anything on that dashboard. Obviously I don't want a separate dashboard for each user group.

       

      I can't figure out the syntax - I've only gotten as far as:

      IF ISMEMBEROF('CHICAGO HEADS') THEN 'TRUE' END

       

      If I add:

      IF ISMEMBEROF('CHICAGO HEADS') THEN 'TRUE'

      ELSEIF ISMEMBEROF ('DC HEADS') THEN 'TRUE' END

       

      then no one can see anything. And if I create separate filters for each group, they all cancel each other out.

       

      What am I doing wrong??

       

      Thanks!

        • 1. Re: ISMEMBEROF multiple groups & dimensions
          Adrian Slade

          i imagine that you will need to check the field you wish the comparisons to be on as well as the ISMEMBER() function. Something like:

           

          ([employee]=username() or (ismemberof('CHICAGO HEADS') and [Office]='Chicago') or (ismemberof('DC HEADS') and [Office]='DC'))

          • 2. Re: ISMEMBEROF multiple groups & dimensions
            Caite Stevens

            So I got that part, and it works great - Chicago Heads can see Chicago records. But as soon as I try to add in a line about DC Heads, I run into trouble. As soon as I add it in, the Chicago Head can now see both Chicago and DC, and the DC  head can see both DC and Chicago. How do I get it so the Chicago Head only sees Chicago and the DC Head only sees DC?

             

            IF ISMEMBEROF("Office/Dept Heads") and ([Office] = "Chicago")

            then "true"

            ELSEIF ISMEMBEROF("Office/Dept Heads") and ([Office] = "DC")

            then "true" else "false"

            END

            • 3. Re: ISMEMBEROF multiple groups & dimensions
              Adrian Slade

              What i provided was the whole calculation. Enter all of it into your calculated field without any other IF statements. Just change the fieldnames to match your fields...

               

              ([employee]=username() or (ismemberof('CHICAGO HEADS') and [Office]='Chicago') or (ismemberof('DC HEADS') and [Office]='DC'))

               

              so it's saying doing 3 Boolean checks:

              does the username match the employee (True or False)

              OR

              are they a member of Chicago Heads AND [office] = Chicago (True or False)

              OR

              are they a member of DC Heads AND [office] = DC (True or False)

               

              then because they are OR only 1 has to be true for the whole statement to be True.

              • 4. Re: ISMEMBEROF multiple groups & dimensions
                Adrian Slade

                Sorry I missed your updated code that indicates the person is in the "Office/Dept Heads". Is there not a 'CHICAGO HEADS' group & your original statement was wrong?

                 

                If this is true then you need to be able to determine which office the person is head for? is there a field to determine that? If so then you can update the calculation like so:

                ([employee]=username() OR (ismemberof('Office/Dept Heads') AND ((check if they belong to Chicago office AND [Office]='Chicago') OR (check if they belong to DC office AND [Office]='DC'))))

                • 5. Re: ISMEMBEROF multiple groups & dimensions
                  Caite Stevens

                  I will try this - I've been playing around with both Chicago Heads and Office Heads, trying to figure out which is the best solution, so will incorporate your answer to my data and see what happens!