10 Replies Latest reply: Oct 13, 2016 3:08 AM by Andre Toerien RSS

    Section access

    Andre Toerien

      Hi

       

      I have two identical models, one without section access and one with section access. They reload from qvd files, in case this makes a difference.

       

      The only difference is the model without section access reloads, the model with section access loads section access , but none of the other scripts.

       

      This is what I added for section access

       

      Section Access;

      LOAD * INLINE [

      ACCESS, USERID, PASSWORD, REGION

      ADMIN, ADMIN, ADMIN,

      USER, CHRIS, CHRIS1, CENTRAL

      USER, ERIN, ERIN1, EAST

      USER, SAM, SAM1, SOUTH

      USER, WILLIAM, WILLIAM1, WEST

      ];

       

      Attached are the log files from the reloads. I have no idea what I did wrong. If I open the model with section access after going through the reloand it asks me for the password when opening the model, so it's failing on the reloading of the data

        • Re: Section access
          Jonathan Dienst

          Did you include a Section Application; statement after the section access load?

            • Re: Section access
              Andre Toerien

              No, this is the first time I am using it, what is the Section application

              for?

               

              On Wed, Oct 12, 2016 at 3:58 PM, Jonathan Dienst <qcwebmaster@qlikview.com>

                • Re: Section access
                  Peter Cammaert

                  QlikView Load scripts can be divided in sections, where one particular section type - called "Application" - does the expected things with statements and tables to generate a data model, and another section type - called "Access" - does secret things to create a security set-up. Although the statements in section Access look similar to those used in section Application, they do different things.

                   

                  A section is marked at the start using a statement that indicates its type. A new section statement ends the previous section and starts a new one with the indicated type. Section Application and Section Access can be repeated as many times as you want, and in any order. Statements in Section Application affect the data model and those in Seciton Access affect the security set-up. There is always a section active. If you do not specify a Section statement, the default section type will be "Application".

                   

                  If you only use a Section Access; statement at the beginning of your (possibly hidden) script, and no subsequent Section Application; statement, everything will go into the security set-up, and no data model will be available at the end of script execution. Apparently, you also get weird error messages about missing fields (although they're probably there all right). Add a Section Application; statement after the last statement of your Section Access;, to make sure that subsequent LOAD statements build a regular data model.

                   

                  Best,

                   

                  Peter

                   

                  [Edit] A shorter explanation by Qlik is given here: Security ‒ QlikView - see the paragraph titled "Sections in the Script".

                    • Re: Section access
                      Andre Toerien

                      So, if I understand correctly adding section application will resolve the issue? I will read up on what I should be doing with section application

                        • Re: Section access
                          Marcus Sommer

                          Be careful by using section access - you could yourself lock out and loose an application without having backups. Here you will find many informations about Section Access and I suggest to start with the introduction.

                           

                          - Marcus

                            • Re: Section access
                              Andre Toerien

                              Here is my script. Now I have and issue that if I login with the user he can still see everything.


                              Thanks, noted. I have a backup copy with no section access.

                               

                              Section Access;
                              LOAD * INLINE [
                              ACCESS, USERID, PASSWORD, REGION
                              ADMIN, ADMIN, ADMIN,
                              USER, CHRIS, CHRIS1, CENTRAL
                              USER, ERIN, ERIN1, EAST
                              USER, SAM, SAM1, SOUTH
                              USER, WILLIAM, WILLIAM1, WEST
                              ]
                              ;
                              Section Application;

                               

                              Customers:
                              Load [Row ID] as OrderRowID,
                              Region,
                              Upper(Region) as REGION,
                              [Customer Name] as CustomerName,
                              [Province] as CustomerProvince,
                              [Customer Segment] as CustomerSegment
                              FROM $(qvdpath)\Customers.qvd (qvd);

                              Users:
                              Load Region,
                              Upper(Manager) as MANAGER,
                              Upper(Manager) as USERID
                              FROM $(qvdpath)\Users.qvd (qvd);

                               

                               

                              I have tried it different ways, something is just not working

                              • Re: Section access
                                Andre Toerien

                                OK I did not set Document properties. If there is no data for the region for the user it does deny the user access to the document. Is that the correct behaviour or should it open a blank document.

                                 

                                I did open it with a user with access to a region with data and it worked fine