Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

section access on hierarchy field

Hi all ,

I had created hierarchy of organisation structure  using hierarchy function . And the hierarchy field is used in List box in Tree format .

my requirement now is

i want apply section  access to  that list box .

suppose  if manger has logged in using his User id  he should see all the peoples employee  data under him .

if employee logged in he should see only his data ,

Note: The section access will be provided based on User Id  their will no password  . we can have NT domain  .

Can any one please help me on this .

8 Replies
avinashelite

Anonymous
Not applicable
Author

Hi Avinash

Thanks for response avinashelite,

I  had done same  , but section access is not working properly . Can you  advise  me  how to implement .

I am sharing  sample Qvw .please have a look.

Anonymous
Not applicable
Author

Hi  tresesco‌ can you please help on this.

MK9885
Master II
Master II

Your Section Access Inline load isn't in upper case plus it doesn't define who holds what position and SA cannot know what to restrict and what not to?

I believe you'd need to have a separate column defining who's Manager or User

And with in section Access inline load you need to add a field which you want to restrict or show

Ex:

STAR IS *;

SECTION Access;

LOAD * INLINE [
ACCESS, UID, POSITION, SALARY, USERID, PASSWORD
ADMIN, PAVAN, MANAGER, 2000, PAVAN, 1234
ADMIN, RAFI, MANAGER, 15500, RAFI, 1234
USER, RAJESH, USER, 40000, RAJESH, 123
ADMIN, UDAY, MANAGER, 10000, UDAY, 1234
USER, NAVIN, USER, 30000, NAVIN, 123

ADMIN, , MANAGER, *, ADMIN, ABCD

];

Section Application;


The above table will restrict as per Salary so you'd either need to give the field name with all values and STAR IS *; is show all values.

So user with name ADMIN and password ABCD will see all the users including manager and their salaries.

This is not tested but it should be in this way. And when you publish it, replace the USERID and PASSWORD with NTNAME

Maybe you should have an extra field as POSITION in your Data model which will easily fetch who is what and restrict them.

Anonymous
Not applicable
Author

Hi Aehman,

Thanks for spending  your time .

my requirement  is if manger is logged  in using his user id , he should be visible his data and employess under him.

if employee logged in  he should see only his data  .

for example: if Uday has logged in he should his data and rajesh data .

                  if rajesh has logged in he should only his data .

Note: we don't have password . we cant define manually . user will login using his user id .

please help me on this if possible share sample app

thanks in advance !

avinashelite

Mahesh , did you tries the example which I provided ? It is inline with your requirement ....update the columns according to you data set that will give you the results

rahulpawarb
Specialist III
Specialist III

Hello Mahesh,

Trust that you are doing well!

Please refer the below link:

Authorization using a Hierarchy

Hope this will be helpful.

Regards!

Rahul

tresesco
MVP
MVP

Check the blog post by Henric - Rahul suggested above.