3 Replies Latest reply: Oct 7, 2013 7:21 AM by Josetxo Amonarriz RSS

    Section access - wildcard in multiple reduction fields

    Josetxo Amonarriz

      Hello,

       

      I need to set up user access, so

      • users 1 to 6 should see their records in all countries
      • qlikuser should see Viggo's records only in Sweden
      • Qlikuser should see all records in Finland and Norway

       

      Section Access;

      LOAD * INLINE [

      ACCESS,        NTNAME,        SALESPERSON,        COUNTRY

      ADMIN,        ADMINISTRATOR,    *,            *

      USER,        USER1,        VIGGO,            *

      USER,        USER2,        JOHAN,            *

      USER,        USER3,        ANNIE,            *

      USER,        USER4,        HAKAN,            *

      USER,        USER5,        PIOTR,            *

      USER,        USER6,        HELEN,            *

      USER,        QLIKUSER,    VIGGO,            SWEDEN       

      USER,        QLIKUSER,    *,            FINLAND

      USER,        QLIKUSER,    *,            NORWAY

      ];

       

      The result is that QLIKUSER can see all records in Finland and Norway... and Sweden!!! He should seet only Viggo's records in Sweden but he sees all records for the rest of users.

       

      Is the desired  data reduction possible in Qlikview?

       

      Many thanks in advance!

      Josetxo

        • Re: Section access - wildcard in multiple reduction fields

          Hi Josetxo,

           

          You could try loading it from an excel file. Put the details in an excel file then load it like this.

           

          SECTION Access;

          Directory;

          LOAD

               ACCESS,

               NTNAME,

               PASSWORD,

               upper(SALESPERSON) as SALESPERSON,

               upper(COUNTRY) as COUNTRY

          FROM

          access.xlsx

          (ooxml, embedded labels, table is Sheet1);

           

          Regards,

          Janzen

          • Re: Section access - wildcard in multiple reduction fields
            jagan mohan rao appala

            HI,

             

            Can you attach your script in data model which has Salesperson and Country fields?  Your datamodel should have this fields then it will automatically restricts.

             

            Regards,

            Jagan.

            • Re: Section access - wildcard in multiple reduction fields
              Josetxo Amonarriz

              Well, with some help from our partner we have what we wanted. Hidden script:

               

              Section Access;

              [SECURITY]:

              LOAD

                   NTNAME,      

                   ACCESS,

                   REDUCTION1,

                   REDUCTION2  

              FROM Reductions.xls (biff, embedded labels, table is Security$);

               

              Section Application;

              STAR IS *;

               

              Access:

              LOAD

                REDUCTION1,

                SalesPerson

              FROM IReductions.xls (biff, embedded labels, table is Reduction1$);

               

              Access2:

              LOAD

                REDUCTION2,

                Country

              FROM Reductions.xls (biff, embedded labels, table is Reduction2$);

               

              The Reductions.xls file looks like this:

               

              Security sheet:

              NTNAME ACCESSREDUCTION1REDUCTION2
              ADMINISTRATORADMINALLALL
              USER1ADMINVIGGOALL
              USER2USERJOHANALL
              USER3ADMINANNIEALL
              USER4USERHAKANALL
              USER5USERPIOTRALL
              USER6USERHELENALL
              QLIKUSERUSERVIGGOALL
              QLIKUSERUSERALLSWEDEN
              QLIKUSERUSERALLFINLAND
              QLIKUSERUSERALL

              NORWAY

               

              Reduction1 sheet:

               

              REDUCTION1SalesPerson
              ALL*
              VIGGOViggo Mortensen
              JOHANJohan Muller
              ANNIEAnnie Hall
              HAKANHakan Mild
              PIOTRPiotr Volkov
              HELENHelen Lindt

               

              Reduction2 sheet:

               

              REDUCTION2Country
              ALL*
              SWEDENSweden
              FINLANDFinland
              NORWAYNorway

               

              Thanks to you all who helped me!