Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

simotrab
Contributor II

Qlik Sense Section Access Script

Hi community,

I'm working on section access part of the script in Qlik Sense (logically not Qlik Sense Desktop).

My situation is described here

https://community.qlik.com/thread/198691?sr=stream

I've read the documentation,

https://help.qlik.com/sense/1.1/en-US/online/index.html#../Subsystems/Hub/Content/Scripting/Security...

and also some discussions.

My problem is this.

I've those datas

table:

Load

chief,

Upper(agent) as AGENT,

performance

inline

[

chief,agent,performance

alfa,BETA1,5

alfa,BETA2,4

]

;

I've put Upper(agent) instead of agent because I suppose to understand that for section access you should use upper case (to avoid any mistake, probably I've put some superflous uppercases).

Now I got three users, ID1, ID2, ID3.

I would like that ID1 could see only the data referred to BETA1, ID2 could see only the data referred to BETA2, and ID3 could see everything, so I decide those restriction:

section access;

Load *

inline [

ACCESS, USERID,AGENT

USER,ID1,BETA1

USER,ID2,BETA2

USER,ID3,*

];

section application:

LOAD

BETA1 AS REDUCTION,

BETA2 AS REDUCTION;

I reload the data, but after closing the app and re-opening it, the result is a pop-up of Access Denied (the translation should be "An error occurs, access denied").

error.PNG

So, how can I fix it?

Thanks a lot!

1 Solution

Accepted Solutions
Not applicable

Re: Qlik Sense Section Access Script

SimoneT,

UserID field needs to be filled out as userdirectory\userid.  you are including the userid only.  The userdirectory for these users needs to be included as well in format $ud\$id.

In addition, your inline data load before section access has AGENT non capped for the inline load.  I can't tell if you are doing a preceding load or not in your code sample.  If so, then please ignore this paragraph.

Keep in mind Qlik sometimes has an issue with special characters that would be urlencoded like an @ symbol and others.  So avoid using them if possible.

Regards,

Jeff G

4 Replies
Not applicable

Re: Qlik Sense Section Access Script

SimoneT,

UserID field needs to be filled out as userdirectory\userid.  you are including the userid only.  The userdirectory for these users needs to be included as well in format $ud\$id.

In addition, your inline data load before section access has AGENT non capped for the inline load.  I can't tell if you are doing a preceding load or not in your code sample.  If so, then please ignore this paragraph.

Keep in mind Qlik sometimes has an issue with special characters that would be urlencoded like an @ symbol and others.  So avoid using them if possible.

Regards,

Jeff G

simotrab
Contributor II

Re: Qlik Sense Section Access Script

Hi Jeffrey,

thanks a lot, it works fine.

prahladind9
New Contributor III

Re: Qlik Sense Section Access Script

Hi,

Go through this post

Section Access in Qlik Sense.

Hope this gives a little more knowledge .

Not applicable

Re: Qlik Sense Section Access Script

Cant access the link Prahlad Rao.