Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Ran
Contributor III
Contributor III

Section Access with 3 Parameters

hi,

 i have QlikSense HR Model and i need to do Section Access 

i have Excel with UserName, Access(User/Admin) and Sheets Colums and i give each user access to

see different Sheets

the SA is  working..

now I need that they will see Central Unit,Brigade,Unit ( 3 different fields.. Hirarcy is Central Unit>Brigade>Unit)

i added those columns into the excel and Made Central Unit&'|'&Brigade&'|'&Unit as a Key to connect to the UnitTable in the script ( have all units fields and made there this key too)

 

if i write each user specific units(all 3 fields) its working 

if i put * in each of those fields its dont work cause the unit table dont have *&'|'&*&'|'&* in his Key

i wrote if Cental Unit =* ,* else Central Unit&'|'&Brigade&'|'&Unit  that means that * in central unit so he can see all else if i wrote specific give me this .

so this Combination dont work

Central       Brigade             Unit 

aa                    *                       *

bb                 cc                       *

 i tried also to remove this key and just write this fields but its create some Syntetic keys and dont work

 

Please Help 

Thanks

 

 

 

1 Solution

Accepted Solutions
rubenmarin

Hi, I would try to use a keyword like 'ALL' instead of an sterisk, as the asterisk could be interpreted in a differnt way than just a text.

And you can create an intermediate table the relates the combination with the ALL keyword with all the real values of that field, as an example:

SectionAccess:
LOAD 
	Upper(Central&Brigade&Unit) as SA
Inline [
Central, Brigade, Unit
aa,ALL,ALL
bb,cc,ALL
];

Hierachy:
LOAD *, Central&Brigade&Unit as Combination Inline [
Central,Brigade,Unit
aa,aa,aa
aa,aa,bb
aa,bb,cc
bb,dd,ff
];

Intermediate:
LOAD
	Combination,
    Upper(Combination) as SA
Resident Hierachy;

concatenate (Intermediate)
LOAD
	Combination,
    Upper(Central&Brigade&'ALL') as SA
Resident Hierachy;

concatenate (Intermediate)
LOAD
	Combination,
    Upper(Central&'ALL'&'ALL') as SA
Resident Hierachy;

View solution in original post

1 Reply
rubenmarin

Hi, I would try to use a keyword like 'ALL' instead of an sterisk, as the asterisk could be interpreted in a differnt way than just a text.

And you can create an intermediate table the relates the combination with the ALL keyword with all the real values of that field, as an example:

SectionAccess:
LOAD 
	Upper(Central&Brigade&Unit) as SA
Inline [
Central, Brigade, Unit
aa,ALL,ALL
bb,cc,ALL
];

Hierachy:
LOAD *, Central&Brigade&Unit as Combination Inline [
Central,Brigade,Unit
aa,aa,aa
aa,aa,bb
aa,bb,cc
bb,dd,ff
];

Intermediate:
LOAD
	Combination,
    Upper(Combination) as SA
Resident Hierachy;

concatenate (Intermediate)
LOAD
	Combination,
    Upper(Central&Brigade&'ALL') as SA
Resident Hierachy;

concatenate (Intermediate)
LOAD
	Combination,
    Upper(Central&'ALL'&'ALL') as SA
Resident Hierachy;