Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I've the below sample data:
ManagerID | ManagerName | ResourceID | ResourceName | ResourceStatus | ResourceRole | ResourceType |
123456789 | Mgr-1 | 612058116 | Test-1 | Allocated | Solution Manager | Sub-Con |
123456789 | Mgr-1 | 612058117 | Test-2 | Allocated | Solution Manager | BT FTE |
123456788 | Mgr-2 | 612058118 | Test-3 | Allocated | Solution Manager | External Consultant |
123456789 | Mgr-2 | 612058119 | Test-4 | Allocated | Solution Manager | Sub-Con |
123456790 | Mgr-3 | 612058120 | Test-5 | Allocated | Solution Manager | BT FTE |
123456790 | Mgr-3 | Vacancy | Solution Manager |
And let's say that I have created a master dimension (Drill-Down) using ManagerID and ResourceID.
Now I create this table on the dashboard with just Manager details and because of drill-down dimension, it will show the relevant resource details once I click on any particular ManagerID.
ManagerID | ManagerName |
123456789 | Mgr-1 |
123456789 | Mgr-1 |
123456788 | Mgr-2 |
123456789 | Mgr-2 |
123456790 | Mgr-3 |
123456790 | Mgr-3 |
All ok till here. But I also have one requirement where I need to restrict other managers to see other resources details. For e.g., Mgr-1 should only see Test-1 and Test-2 data. How do I achieve this?
Thanks a lot, in advanced!!
Eevrything you mentioned can be handled in section access.
try below script:
// Section Access to control user access based on roles
Section Access;
LOAD * INLINE [
ACCESS,USERID,PASSWORD,MANAGER
ADMIN,ADMIN,ADMIN,*
USER,MGR1,MGR1,MGR1
USER,MGR2,MGR2,MGR2
USER,MGR3,MGR3,MGR3
];
Section Application;
// Load the actual data with MANAGER field to link to section access
RawData:
LOAD
ManagerID,
TEXT(UPPER(PURGECHAR(ManagerName,'-'))) AS MANAGER,// Use ManagerName as MANAGER for matching
ManagerName,
ResourceID,
ResourceName,
ResourceStatus,
ResourceRole,
ResourceType;
LOAD * INLINE [
ManagerID,ManagerName,ResourceID,ResourceName,ResourceStatus,ResourceRole,ResourceType
123456789,Mgr-1,612058116,Test-1,Allocated,Solution Manager,Sub-Con
123456789,Mgr-1,612058117,Test-2,Allocated,Solution Manager,BT FTE
123456788,Mgr-2,612058118,Test-3,Allocated,Solution Manager,External Consultant
123456789,Mgr-2,612058119,Test-4,Allocated,Solution Manager,Sub-Con
123456790,Mgr-3,612058120,Test-5,Allocated,Solution Manager,BT FTE
123456790,Mgr-3, , ,Vacancy, Solution Manager,
];
If you have the hierarchy stored in an Adjacent Nodes table, you should be able to do it. See more on:
https://community.qlik.com/t5/Design/Authorization-using-a-Hierarchy/ba-p/1476319
https://community.qlik.com/t5/Member-Articles/Hierarchies/ta-p/1487801
Hierarchies are also well described in my book.
Thank you for your response. Is it possible for you to provide an example of Adjacent Nodes table (based on the data I've given in my question please). I just want to know the structure of the Adjacent Nodes table, so that I can create it and move further accordingly to implement the requirement.
It depends on where you have your hierarchy. If it's just the relationship between manager and resource, then you can use ManagerID or ManagerName in your Section Access, and it should work.
But if you have a situation where you have submanagers that report into an other manager, then you need to store it in an Adjacent nodes table.
Eevrything you mentioned can be handled in section access.
try below script:
// Section Access to control user access based on roles
Section Access;
LOAD * INLINE [
ACCESS,USERID,PASSWORD,MANAGER
ADMIN,ADMIN,ADMIN,*
USER,MGR1,MGR1,MGR1
USER,MGR2,MGR2,MGR2
USER,MGR3,MGR3,MGR3
];
Section Application;
// Load the actual data with MANAGER field to link to section access
RawData:
LOAD
ManagerID,
TEXT(UPPER(PURGECHAR(ManagerName,'-'))) AS MANAGER,// Use ManagerName as MANAGER for matching
ManagerName,
ResourceID,
ResourceName,
ResourceStatus,
ResourceRole,
ResourceType;
LOAD * INLINE [
ManagerID,ManagerName,ResourceID,ResourceName,ResourceStatus,ResourceRole,ResourceType
123456789,Mgr-1,612058116,Test-1,Allocated,Solution Manager,Sub-Con
123456789,Mgr-1,612058117,Test-2,Allocated,Solution Manager,BT FTE
123456788,Mgr-2,612058118,Test-3,Allocated,Solution Manager,External Consultant
123456789,Mgr-2,612058119,Test-4,Allocated,Solution Manager,Sub-Con
123456790,Mgr-3,612058120,Test-5,Allocated,Solution Manager,BT FTE
123456790,Mgr-3, , ,Vacancy, Solution Manager,
];
Thanks a lot for your help!!