3 Replies Latest reply: Aug 17, 2018 6:45 AM by Shahbaz Khan Mohammed RSS

    Qlik Sense Section Access Issue

    Pradnya Pampatwar

      Hello All,

       

      I have created a Qlik Sense (Enterprise Edition) Dashboard in Test Environment and now trying to apply Section Access using a single field.

      I have made used of Excel File for ACCESS, TNAME and Reduction Field. Attached is the pic for the same.

      I am the Admin of the App and this is the data that I have used in Excel.

       

         

      ACCESSNTNAMECost centre number
      ADMINAPAC\U875266*
      ADMINAPAC\u978519*
      USERAPAC\s950167*
      USERAPAC\s950164*
      USERAPAC\s950161*
      USERAPAC\s950158*

       

      Section Access Code in QS:

      FECC:

      LOAD

          "ACCESS",

          NTNAME,

          "Cost centre number" as "Cost Centre"

      FROM [lib://QA_FE_Section_Access (apac_u978519)/QS FE Section Access.xlsx]

      (ooxml, embedded labels, table is Sheet1);

       

      Concatenate(FECC)

      LOAD Distinct 'DUMMY' as NTNAME,

      "Cost Centre"

      Resident MRH2_Master_Data;

       

      SECTION Access;

      STAR is *;

      LOAD Distinct Upper(ACCESS) as ACCESS,

      Upper(NTNAME) as NTNAME,

      [Cost Centre]

      Resident FECC;

      SECTION Application;

       

      DROP Table FECC;

       

      I have followed this YouTube Video for reference: Section Access using a Database Query - YouTube

       

      I have already created a task in QMC and reloaded the App there. Attached is the pic.

       

      The App is added in the DFS_FE Stream. Attached is the pic.

       

      Now, I have refreshed the Qlik Hub and trying to access but I am getting "Access Denied".

       

      Please please help me figure out where I have been going wrong.

       

      Thanks in advance.

       

      Pradnya Pampatwar.

        • Re: Qlik Sense Section Access Issue
          Shahbaz Khan Mohammed

          You are making this SA script very complex for unknown reason.

           

          It is quite simple

          You have your SA table in XL

          In your XL in first line add below row

          USER, INTERNAL\sa_scheduler *

          all the ACCESS field should be USER do not give any one as ADMIN

          The field name should NOT be NTNAME.. it should be USERID

           

          For Cost Center, make sure you use case sensitive (all in caps, even the field name) and add the values which you want to restrict within that script, avoid concatenation.

          That would be your SA table

          Now in your script

           

          Section Access;

          Star is *;

          Load

          ACCESS,

          USERID,

          COST_CENTER

          From......;

          Section Application;use below

           

          Here the trick is to also make sure your Fact table has upper for Cost Center..

          in your fact use below

          Upper([Cost Center]) as COST_CENTER

           

          Now both the name matches in SA table & Fact.. data would be reduced based on that.

          If you are an admin then for COST_CENTER field in SA XL table just give * to you and sa_scheduler account.

          For rest of the users give your COST_CENTER values you want to restrict.

           

          Better if you can upload your SA XL file?

          If you get locked out then right click on the app, open without data.