Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Section access

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

1 Solution

Accepted Solutions
Peter_Cammaert
Partner - Champion III
Partner - Champion III

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".

View solution in original post

10 Replies
jonathandienst
Partner - Champion III
Partner - Champion III

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

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Not applicable
Author

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>

Peter_Cammaert
Partner - Champion III
Partner - Champion III

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".

Not applicable
Author

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

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

Not applicable
Author

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

Not applicable
Author

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

marcus_sommer

You need to enable the option of strict exclusion within the document properties in tab open. Within my link from above is a good description of this option.

- Marcus

Not applicable
Author

Should the document refuse access if there is no data for the user's region or just give a blank document, currently it is just refusing access to the model for those without any data on the model