Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
kiranpatil123
Contributor III
Contributor III

Qlik sense Section Access Help Needed

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 

Reporteesmgr1mgr2
John BridleSharad JunejaJeff Barnes
Jason MichalakosKevin O'NeilDarran Fischer
Shona MillerKevin O'NeilDarran Fischer
Jim TaborskiKevin O'NeilDarran Fischer
Shelley KitchenStephen MayerDarran Fischer
Brent QuadeStephen MayerDarran Fischer
Sam TucciEric BerubeDarran Fischer
Dave BuchaskiJen CoxDarran Fischer
10 Replies
martinpohl
Partner - Master
Partner - Master

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)

otmane
Contributor III
Contributor III

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

martinpohl
Partner - Master
Partner - Master

In QlikView it was NTNAME, in Qlik Sense it is USERID!

Regards

otmane
Contributor III
Contributor III

Yes Correct.

kiranpatil123
Contributor III
Contributor III
Author

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 IDAccessManagers
usd41462User 
usd02658User 
usd02498User 
cad10452User 
usd02965User 
123Admin*
ID of Users who have access to the streamAdmin*
internal\sa_scheduler Admin*
martinpohl
Partner - Master
Partner - Master

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

kiranpatil123
Contributor III
Contributor III
Author

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.

martinpohl
Partner - Master
Partner - Master

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

martinpohl
Partner - Master
Partner - Master

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