4 Replies Latest reply: Apr 22, 2015 10:44 AM by Azadeh Aboutalebi RSS

    Section Access

      Hi

      I am trying to set up SECTION ACCESS to restrict the access and each division can see only the related data.

       

      The problem is that the data filtering doesn't work and I don't know why. I read all the forums but did not help.

       

       

       

      Section Access;LOAD * INLINE [

          ACCESS, USERID, PASSWORD, NTNAME, UPPER(DirectorateCode), UPPER(DirectorateDescription)

          ADMIN, ADMIN, ADMIN, A\B, A, A

           USER, USER1, U1, A\B, B, B

           USER, USER2, U2, A\B, C, C

      ];Section Application;

       

       

       

      and also I selected "Initial Data Reduction based on Section Access" and strict exclusion  at the Document Properties / Opening tab.

       

       

       

       

       

      Any idea why it is not working?

        • Re: Section Access
          Shiva Reddy

          try this,

          Section Access;

          LOAD * INLINE [

              ACCESS, USERID, PASSWORD, NTNAME, UPPER(DirectorateCode), UPPER(DirectorateDescription)

              ADMIN, ADMIN, ADMIN, A\B, A, A

               USER, USER1, U1, A\B, B, B

               USER, USER2, U2, A\B, C, C

          ];

          Section Application;

          Load * Inline [

          UPPER(DirectorateCode), UPPER(DirectorateDescription)

          A, A

          B, B

          C, C

          ];

          • Re: Section Access
            Ruben Marin

            Hi Azadeh, your field names should be:

            Section Access;LOAD * INLINE [

                ACCESS, USERID, PASSWORD, NTNAME, DIRECTORATECODE, DIRECTORATEDESCRIPTION

                ADMIN, ADMIN, ADMIN, A\B, A, A

                 USER, USER1, U1, A\B, B, B

                 USER, USER2, U2, A\B, C, C

            ];Section Application;

             

            And also in your script use upper case names.

             

            Iif you want to assure your values are upper you can do a nested load:

            Section Access;

            LOAD ACCESS, USERID, PASSWORD, NTNAME, Upper(DIRECTORATECODE) as DIRECTORATECODE, Upper(DIRECTORATEDESCRIPTION) as DIRECTORATEDESCRIPTION;

            LOAD * INLINE [

                ACCESS, USERID, PASSWORD, NTNAME, DIRECTORATECODE, DIRECTORATEDESCRIPTION

                ADMIN, ADMIN, ADMIN, A\B, A, A

                 USER, USER1, U1, A\B, B, B

                 USER, USER2, U2, A\B, C, C

            ];

            • Re: Section Access
              Bill Britt

              HI,

               

              Take a look at ExampleA code is below. Here USER1 will see all the fields except SALES

               

              2.png

               

              Section Access;

              LOAD * INLINE [

              ACCESS, USERID, PASSWORD, OMIT

              ADMIN, ADMIN, ADMIN,

              USER, USER1, U1, SALES

              USER, USER2, U2, WAREHOUSE

              USER, USER3, U3, EMPLOYEES

              USER, USER4, U4, SALES

              USER, USER4, U4, WAREHOUSE

              USER, USER5, U5, *

              ];

              Section Application;

              LOAD * INLINE [

              SALES, WAREHOUSE, EMPLOYEES, ORDERS

              1, 2, 3, 4

              ];

               

               

               

               

              Now look at Example B the code is below. USER1 here will only see the data for AFRICA.

               

              Section Access;

              LOAD * INLINE [

              ACCESS, USERID, PASSWORD, REGION

              ADMIN, ADMIN, ADMIN,

              USER, USER1, U1, AFRICA

              USER, USER2, U2, AMERICA

              USER, USER3, U3, ASIA

              USER, USER4, U4, EUROPE

              USER, USER5, U4, AMERICA

              USER, USER5, U5, *

              ];

              Section Application;

              SALES:

              LOAD * INLINE [

              REGION, PROFIT

              AFRICA, 1000

              AMERICA, 2000

              ASIA, 3000

              EUROPE, 4000

              OCEANIA, 5000

              ];


              1.png

              • Re: Section Access

                Hi

                 

                Many thanks for your replies, my fields were lower case then I had to put upper() when I was retrieving data from database

                 

                upper(DirectorateDescription) as DIRECTORATEDESCRIPTION

                 

                sql exec QlikviewEventSummary;