Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

ipsitasyngenta
New Contributor

Implementation of Section Access in Qlik Sense is not working

Hello Team,

I an very new to Qlik and wanted to implement the section access security in one of my Qlik Sense App. I never did it in Qlik View as well. As far as learning from blogs and discussions and now I want to implement in one of my Project. I need your help and suggestions asap as because of work delivery.

Requirement:

All Users mentioned in the ChildLevel field should be able to view the data of their respective level and the level lower to them.

User hierarchy need to be maintained as NSM(higher)>DM>BM>TM(Lower)

Steps I did:

1. Created Section Access excel sheet.Attached

SA screenshot.PNG

2. Defined the field name as Upper in the data source file.

Data Sreenshot.PNG

Then Loaded the script.

As I set myself as Admin but while opening the app it is showing me Access Denied.

Can anyone correct me where I did the mistake. And let me know the correct script to achieve this requirement.

I have attached a sample data file and section access sheet.

Regards,

Ipsita

7 Replies
pawwy1415
Contributor II

Re: Implementation of Section Access in Qlik Sense is not working

Hi,

Try like this below code. Link Section access and section application table by only CHILDLEVEL field.


Security_Tmp:
LOAD NTNAME,
ACCESS,
If ("CHILDLEVEL" = '*', ' ', “CHILDLEVEL") as “CHILDLEVEL”
FROM ....

Section Access;
Load

Upper(NTNAME) as NTNAME,
Upper(ACCESS) as ACCESS,
Upper ("CHILDLEVEL") as CHILDLEVEL
Resident Security_Tmp;

Drop Table Security_Tmp;


Section Application;
LOAD
Upper (“CHILDLEVEL”) as CHILDLEVEL,
load all the remaining fields here
FROM ...

ipsitasyngenta
New Contributor

Re: Implementation of Section Access in Qlik Sense is not working

Team,

I am waiting for some help.

Regards,

Ipsita

ipsitasyngenta
New Contributor

Re: Implementation of Section Access in Qlik Sense is not working

Thanks Kumar for your reply.

To apply this script do i need to change any field sequence or field value in my section access table or data store table?

Please advice.

Regards,

Ipsita

pawwy1415
Contributor II

Re: Implementation of Section Access in Qlik Sense is not working

Hi,

No need to change the field order or field name apply the above logic in you code.

Remember before section access don't place any other script. I mean always the below code should be in first section section application should be in next section.

Security_Tmp:
LOAD NTNAME,
ACCESS,
If ("CHILDLEVEL" = '*', ' ', “CHILDLEVEL") as “CHILDLEVEL”
FROM ....

Section Access;
Load

Upper(NTNAME) as NTNAME,
Upper(ACCESS) as ACCESS,
Upper ("CHILDLEVEL") as CHILDLEVEL
Resident Security_Tmp;

Drop Table Security_Tmp;

ipsitasyngenta
New Contributor

Re: Implementation of Section Access in Qlik Sense is not working

Thanks Again!!

yes I am scripting this logic in the beginning of the all script. Just now applied and tried to load it but I am geting error as Field '“CHILDLEVEL"' not found.

I have loaded all the fields along with childlevel in the data store excel as adviced by you.

LOAD
Upper (“CHILDLEVEL”) as CHILDLEVEL,
load all the remaining fields here
FROM ...


Screenshot.PNG

Please advice.

Regards,

Ipsita

pawwy1415
Contributor II

Re: Implementation of Section Access in Qlik Sense is not working

Hi,

Check you Childlevel field name have you loaded correctly or not.

In a separate section just load only your MODView_Final excel file and convert only Child level fields as upper.

no need to convert userid field to upper case.

in the above attaced datastores excel your orginal ChildLevel field is like below.Please check this, in left hand side you need to use the field name like in excel

Upper(ChildLevel) as CHILDLEVEL,

agigliotti
Honored Contributor II

Re: Implementation of Section Access in Qlik Sense is not working

Community Browser