Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All ,
Need to Implement Section Access in the App . I have a stream with one app and there are around 20 users access to that Stream & App .
In the App i have 2 have managers Level Data ( Mgr1 & Mgr2 ) and their reportees . I need to create Section access With Manager Level Data hierarchy .
Ex - If Mgr2 logins , he shud see this Mgr1 data and their reportees and if Mgr1 logins he shud his reportees data Hierarchy Data . If others users login they shud see full data
Should i Maintain a sheet with all users who have access to App and thier ID and the Mgr1 & Mgr2 Names and their ID and do the authentication ? and what field shoud i give as it is Hierarchy data
Please help to write this script . Hierarchy Belongs to function using how to write this
Advance Thanks
Reportees | mgr1 | mgr2 |
John Bridle | Sharad Juneja | Jeff Barnes |
Jason Michalakos | Kevin O'Neil | Darran Fischer |
Shona Miller | Kevin O'Neil | Darran Fischer |
Jim Taborski | Kevin O'Neil | Darran Fischer |
Shelley Kitchen | Stephen Mayer | Darran Fischer |
Brent Quade | Stephen Mayer | Darran Fischer |
Sam Tucci | Eric Berube | Darran Fischer |
Dave Buchaski | Jen Cox | Darran Fischer |
section access;
load
'ADMIN' as ACCESS,
upper(Reportees' as USERID,
upper(mgr1) as MGR
resident yourdata;
load
'ADMIN' as ACCESS,
upper(Reportees' as USERID,
upper(mgr2) as MGR
resident yourdata;
section application;
you need to add INTERVAL\SCHEDULER as a user for reloadtasks.
There are specials in section access:
fields and values in upper letters, so you have to create a field where the values are linked in upper cases (in your example I called it MGR)
Hi kiranpatil123,
Your Section Access table should look like :
where MANAGER_LEVEL is a field in your data model (you can apply a crosstable to your exemple to get the correct form)
NTNAME | ACCESS | MANAGER_LEVEL |
Sharad Juneja | USER | Mgr1 |
Jeff Barnes | USER | Mgr2 |
UserA | USER | * |
UserB | USER | * |
UserC | USER | * |
YOUR NTNAME | ADMIN | * |
You can Maintain this in an Excel, csv file or QVD for more security.
Don't forget to add at last one admin access right.
Regards,
Otmane
In QlikView it was NTNAME, in Qlik Sense it is USERID!
Regards
Yes Correct.
Hi @otmane and @martinpohl
Thanks for reply . Small Query , While creating the Section access Table via excel .
I have slight change of requirement . Now i have only 1 Managers and their reportees are not gonna login to the app , only Managers will login and other users(Admin) . So Below is the Table i have created . Please do check if its right . I have created Managers ID and What field should be in the 3rd column , Should it be Managers Code1 it self or Manager Name
Advance Thanks
Managers ID | Access | Managers |
usd41462 | User | |
usd02658 | User | |
usd02498 | User | |
cad10452 | User | |
usd02965 | User | |
123 | Admin | * |
ID of Users who have access to the stream | Admin | * |
internal\sa_scheduler | Admin | * |
it must be the values you are using in your datas.
Remember the restrictions of section access:
all values and all fields in upper letters.
Regards
Hi ,
I put the below script and got the error . Can you help me on this
Script
Section Access;
load
Upper('CODE1\'&"Manager Code1") as ID,
Upper(trim(Access)) as ACCESS ,
Upper(trim(Manager)) as MANAGER
//Upper(EMAIL) as EMAIL
FROM Path
Section Application;
Excel
Data contains ID and Access as 'ADMIN' & 'USER' and Manager field as again ID. For ADMIN i have given * .
Please note i have added my ID and as ADMIN and given * and have also added internal\sa_scheduler in ID and as ADMIN and given * but iam getting below error
ERROR
Access was denied after reload. Check that the user that reloads the script is included in the section access part of the script.
are the values in field MANAGER the same as in your data?
are in your data model also exists a field MANAGER with upper values?
Regards
maybe load your script without the command section access.
so you can see, if you select a value in field userid, what datas are linked.
Regards