Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
sumanta12
Creator II
Creator II

Section access on Hierarchy

Hi,

I have data set like below 

REGIONAL_HEAD AMPM STAFF_MEMBER
A B X
A B Y
A C P
A C Q
A D M

 

So when logged in he can see his data as well as B, C D, X,Y,P,Q,M data

when B logged in he can see his own data as well as X, Y data

similarly when X logged in he can see his own data.

How to achieve this in section access??

I tried with hierarchybelongsto function but as we have 300k records that why it is getting mulitipled to huge no of records and failed after loading 5 hrs.

 

19 Replies
sumanta12
Creator II
Creator II
Author

Do I need to create any manual excel file for section access.

abhijitnalekar
Specialist II
Specialist II

HI @sumanta12 ,

create below inline-table as section access script

[Security]:

LOAD * inline [

ACCESS, USERID, REGIONAL_HEAD,AMPM,STAFF_MEMBER

ADMIN, DOMAIN\ADMINUSER, *,
USER, DOMAIN\A,A,
USER, DOMAIN\B,,B,
USER, DOMAIN\X,,,X
ADMIN, INTERNAL\SA_SCHEDULER, *, *,


];

Section Application;

Regards,
Abhijit
keep Qliking...
Help users find answers! Don't forget to mark a solution that worked for you!
sumanta12
Creator II
Creator II
Author

@abhijitnalekar ,

The Same way I created the section Access table but when 'B' logged in he can see his own data as well as his parent data (A), but he should not see the upper level.

abhijitnalekar
Specialist II
Specialist II

@sumanta12 ,

Is B user able to see the staff_member p,q,m?

As A is associated with B B can see the data for A but not all the data which A can See

Eg. When A logs in HE can see the all data for AMPM A,B,C,D

But when B logs in he can't see the data for AMPM B,C,D

 

Regards,
Abhijit
keep Qliking...
Help users find answers! Don't forget to mark a solution that worked for you!
sumanta12
Creator II
Creator II
Author

The below one is my section access table:

ACCESS USERID REGIONAL_HEAD AMPM STAFF_MEMBER
USER DOMAIN\A A    
USER DOMAIN\B   B  
USER DOMAIN\X     X
USER DOMAIN\Y     Y
ADMIN INTERNAL\SA_SCHEDULER * *  

 

SECTION ACCESS;
AUTH:
LOAD
"ACCESS",
"USERID",
REGIONAL_HEAD,
AMPM,
STAFF_MEMBER
FROM [lib://AttachedFiles/TEST_SECURITY.xlsx]
(ooxml, embedded labels, table is [TEST SECURITY]);

 

SECTION APPLICATION;

abhijitnalekar
Specialist II
Specialist II

@sumanta12 ,

What happen when user X login?

Regards,
Abhijit
keep Qliking...
Help users find answers! Don't forget to mark a solution that worked for you!
sumanta12
Creator II
Creator II
Author

@abhijitnalekar It's not filtering the data. It is showing all the records.

sumanta12
Creator II
Creator II
Author

@abhijitnalekar , 

I am trying in Qlikview for testing purpose. with the below script:

Section Access;
AUTH:
LOAD ACCESS,
USERID,
RH,
AMPM,
SM
FROM
[C:\Users\manda\Desktop\Hierarchy_test_data.xlsx]
(ooxml, embedded labels, table is Sheet3);


Section Application;

TAB:
LOAD RH,
AMPM,
SM,
SALES
FROM
[C:\Users\manda\Desktop\Hierarchy_test_data.xlsx]
(ooxml, embedded labels, table is SALES);

 

Error: The document failed to load.

Joseph_Musekura
Support
Support

@sumanta12 ,
As you are using  Qlikview, I hope that this attached pdf document could help as the doc contains 7 small scenarios of errors and how to deal with those errors. 
For Section access in Qlikview, it is imperative to check the meaning of  * or null value, how to allow the admin to load all data etc.. See attached "QlikView Section Access Examples by Errors.pdf".
Sorry, I can't find the link from where I downloaded this file (longtime ago):
/joseph

sumanta12
Creator II
Creator II
Author

I have written the below script & it is working fine:

Section Access;
AUTH:
LOAD
'USER' AS ACCESS,
RH AS USERID,
SM
FROM
[C:\Users\manda\Desktop\Hierarchy_test_data.xlsx]
(ooxml, embedded labels, table is SALES);
LOAD
'USER' AS ACCESS,
AMPM AS USERID,
SM
FROM
[C:\Users\manda\Desktop\Hierarchy_test_data.xlsx]
(ooxml, embedded labels, table is SALES);
LOAD
'USER' AS ACCESS,
SM AS USERID,
SM
FROM
[C:\Users\manda\Desktop\Hierarchy_test_data.xlsx]
(ooxml, embedded labels, table is SALES);

Section Application;

TAB:
LOAD
RH,
AMPM,
SM,
SALES
FROM
[C:\Users\manda\Desktop\Hierarchy_test_data.xlsx]
(ooxml, embedded labels, table is SALES);