Sometimes you may want to ignore user permission filters for the purpose of displaying higher-level aggregates or companywide rankings. To do this, you will need to use IGNORE_FILTERS in conjunction with a specific report setting that will allow permissions to be overridden.


This setting needs to be setup behind the scenes, so if you would like to use it simply submit a support ticket to SurfMerchants to request this setting. Once that is done, you can add IGNORE_FILTERS=USER_PERMISSIONS to show your users all data, regardless of their access.


If you want to know what levels the user’s permissions fall into for the purposes of filtering or showing/hiding data, you can use the following tags:

  • {PERM.TOOLZ_LEVEL_5_IDS}
  • {PERM.TOOLZ_LEVEL_4_IDS}
  • {PERM.TOOLZ_LEVEL_3_IDS}
  • {PERM.TOOLZ_LEVEL_2_IDS}
  • {PERM.TOOLZ_LEVEL_1_IDS}


#show an overall company average, regardless of the user's permission

{AVG(DATATYPES.SHOW_DATATYPE(IGNORE_FILTERS=USER_PERMISSIONS).SCORE)}


#display trending data for the entire company

{|RESULT|IGNORE_FILTERS=USER_PERMISSIONS}

   {|LOOP|RESULT.MONTH_YEAR(SORT=ORDER_NUM)}

      ...

   {/|LOOP|}

{/|RESULT|}



#display average score for whatever level 5's the user is part of

#ignore user permissions so we can show upper-level aggregates

{|RESULT|IGNORE_FILTERS=USER_PERMISSIONS}

<table>

  <thead>

    <tr>

      <th>Name</th>

      <th>Avg Score</th>

    </tr>

     </thead>

  <tbody>

  

  #filter by the user's level 5

  {|LOOP|RESULT.CLIENT_10_LEVEL_5(SORT=NAME,FILTER=ID|IN||EVALTAG(PERM.TOOLZ_LEVEL_5_IDS)|)}

      <tr>

        <td>{CLIENT_10_LEVEL_5.NAME}</td>

        

        #this average will be for the entire level 5, not just the part the current user can see

        <td>{AVG(CLIENT_10_LEVEL_5.PERCENT_SCORE).ROUND(2)}</td>

      </tr>

  {/|LOOP|}

  </tbody>

</table>

{/|RESULT|}


#display the rank for a single location against all locations

#only show to level 1 managers

{|SHOWIF|MANAGER_ACCESS_LEVEL_NUMERIC=1}


  #ignore user permissions so we can rank against all locations

  {|RESULT|IGNORE_FILTERS=USER_PERMISSIONS}

  <table>

    <thead>

      <tr>

        <th>Name</th>

        <th>Avg Score</th>

        <th>Rank</th>

      </tr>

    </thead>

    <tbody>

    {|LOOP|RESULT.CLIENT_10_LEVEL_1(SORT=NAME)}

    

      #only display the location that the manager can see

      #note that this only works for managers with a single level 1

      {|SHOWIF|CLIENT_10_LEVEL_1.ID=|EVALTAG(PERM.TOOLZ_LEVEL_1_IDS)|}

        <tr>

          <td>{CLIENT_10_LEVEL_1.NAME}</td>

          <td>{AVG(CLIENT_10_LEVEL_1.PERCENT_SCORE).ROUND(2)}</td>

          <td>{RANK(AVG(CLIENT_10_LEVEL_1.PERCENT_SCORE), DESC, 2, OVERALL)}</td>

        </tr>

      {/|SHOWIF|}

    {/|LOOP|}

    </tbody>

  </table>

  {/|RESULT|}

{/|SHOWIF|}