Skip to main content
Announcements
Accelerate Your Success: Fuel your data and AI journey with the right services, delivered by our experts. Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
simotrab
Creator III
Creator III

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

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

View solution in original post

5 Replies
Not applicable

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
Creator III
Creator III
Author

Hi Jeffrey,

thanks a lot, it works fine.

prahladind9
Partner - Contributor III
Partner - Contributor III

Hi,

Go through this post

Section Access in Qlik Sense.

Hope this gives a little more knowledge .

Not applicable

Cant access the link Prahlad Rao.

jp_golay
Partner - Creator II
Partner - Creator II

You can now test our new Product SAM that will fully automate Section Access Generation product.

It is no longer necessary to maintain a section access list in Excel or in your database, SAM offers you a complete web application that will secure all your data accesses.


A user can request access to an application with a simple form. Then administrators get notified and can assign the RESTRICTIONS and OMITS from the proposed fields values. User access are generated from on a single line per user, no need to generate tedious cartesian products and include all values to get a "*" value working correctly .

Moreover SAM is able to generate an automatic access section from the authorizations of the QMC, and Reverse Engineer existing section Access a time saving for simple cases.

More details on our website or contact me at jp.golay@ebiexperts.com

jp_golay_0-1639987982182.png

 

 

 

 

ebiexperts CTO
With WIP, Control everything!
Qlik Sense, QlikView and NPrinting Source control, Versioning and Deployment, Agile Lifecycle Management