Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
renjithpl
Specialist
Specialist

Section Access Issue

Hi All,

I have my security table like below

ACCESSNTNAMEUSER_GROUP
USERABCSUPERGROUP
USERXYZNON_INT_GROUP
USERPQRINT_GROUP

and code

Section Access;

load

ACCESS, NTNAME, USER_GROUP

from .... .qvd;

Section Application;

i would like to reduce data in two levels, country and dept

so i have the country and dept table which linked with above table, assume like below;

USER_GROUPCOUNTRYDEPT
XXXXXXCanadaINT
XXXXXXCanadaNON_INT
XXXXXXMEXICOOther

My question is,

1. when user login as PQR, he should see, all canada details including INT and NON_INT dept

2. when user login as XYZ,   he should see, Canada details, but only related to NON_INT dept

I made a key, using (COUNTRY &'##' & DEPT ) as KEY and integrated with section access, but it does not work the way i want,

is there any suggestion or some simple technique to get it done..

thanks in advance

Ren

1 Solution

Accepted Solutions
hic
Former Employee
Former Employee

The simplest way is the following:

UserGroup:

LOAD USERGROUP,

     UPPER(COUNTRY & '#' & If(Len(Trim(DEPT))=0,'<ALL>',DEPT)) as KEY

FROM HierarchyInSectionAccess.xlsx (ooxml, embedded labels, table is UserGroup);

BridgeTable:

LOAD COUNTRY,

     DEPT,

     Upper(COUNTRY & '#' & '<ALL>') as KEY

FROM HierarchyInSectionAccess.xlsx (ooxml, embedded labels, table is Dimension);

LOAD COUNTRY,

     DEPT,

     UPPER(COUNTRY & '#' & DEPT) as KEY

FROM HierarchyInSectionAccess.xlsx (ooxml, embedded labels, table is Dimension);

You probably need to have the UserGroup table inside Section Access, and if you need additional tables for country and dept, you should link those to the BridgeTable

HIC

View solution in original post

11 Replies
Not applicable

you script should look like:

section access;

load * inline
[UserID, USERGROUP,user

ABC, SUPERGROUP, User
XYZ, NONINTGROUP, User

PQR, INTGROUP,User ] ;

section application;

star is *;

load * inline
[USERGROUP, COUNTRY, DEPT
SUPERGROUP, Canada, *
NONINTGROUP, Canada, NON_INT] ;


hic
Former Employee
Former Employee

The star (in DEPT) will unfortunately not do what you want. You need a solution where you use Generic Keys to map your authorization.

See more on

http://community.qlik.com/blogs/qlikviewdesignblog/2012/10/02/complex-authorization
http://community....

HIC

Not applicable

you are right;)

that's becouse i didn't check this script (reload)

i hope renjithpl figured it out

renjithpl
Specialist
Specialist
Author

Hi Henric, would like to open the link you pasted here, but i am unable to open it.

renjithpl
Specialist
Specialist
Author

Thanks for the reply Henric,

I have read the doc,

But my Authorization Table has null values like below

The Dept column has null, which means, SUPERGROUP can view all the department under respective contries.

USERUSER_GROUPCOUNTRYDept
U1SUPERGROUPAE
U2SUPERGROUPBH
U3SUPERGROUPEG
U4SUPERGROUPIR
U5SUPERGROUPJO
U6SUPERGROUPKW
U7SUPERGROUPLB
U8SUPERGROUPOM
U9SUPERGROUPPK
U10SUPERGROUPQA
hic
Former Employee
Former Employee

I think you should create a generic key like

Upper(Country) & '|' & if(Len(Trim(Dept))=0,'<ANY>',Upper(Dept)) as %COUNTRYDEPT

Then you can use an authorization bridge table to map the values of %COUNTRYDEPT to respective COUNTRY and Dept, e.g.

CountryDeptAuthTable.png

HIC

IAMDV
Luminary Alumni
Luminary Alumni

Is this based on Hierarchy? What is the relationship between Country & Dept? which field sits at the most granular level? As suggested by HIC, Generic Keys with Authorization table is very powerful approach to solve this kind of requirements.

Thanks,

DV

www.QlikShare.com

renjithpl
Specialist
Specialist
Author

Hi Henric sorry for the late response,

Here is my situation,

My usergroup table has

USERGROUPCOUNTRYDEPTKEY
SUPERGROUPUA UA##
SUPERGROUPBH BH##
SUPERGROUPSA SA##
GROUP2UAINTUA##INT

Then comes my dimension table which has

COUNTRYDEPTKEY
UAINTUA##INT
UAHOUA##HO
BHINTBH##INT
...
...

when i tried connnecting using KEY, it maps only the GROUP2-UA-INT-UA##INT

Others it doest not show coz it does not know which row to match with, i am confused with the bridge table.

Thanks in advance..