Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

REDUCTION - using two values from field

Which is the proper way to write the section access to allow a user to view two values from one particular field using REDUCTION in section access?

Section Access;

LOAD * INLINE [

    ACCESS, NTNAME, DEPT, DEPT, DEPT

    ADMIN, DOMAIN\ADMIN, *

    USER, DOMAIN\USER1, DEPT1, DEPT2, DEPT3

    USER, DOMAIN\USER2,  DEPT2, DEPT3

    USER, DOMAIN\USER3, DEPT3

     

];

Section Application;

or should it be:

Section Access;

LOAD * INLINE [

    ACCESS, NTNAME, DEPT

    ADMIN, DOMAIN\ADMIN, *

    USER, DOMAIN\USER1, DEPT1

    USER, DOMAIN\USER1, DEPT2

    USER, DOMAIN\USER1, DEPT3

    USER, DOMAIN\USER2, DEPT2

    USER, DOMAIN\USER2, DEPT3

    USER, DOMAIN\USER3, DEPT3

     

];

Section Application;

Any help would be greatly appreciated!  Cheers

2 Replies
vincent_ardiet
Specialist
Specialist

Hi Rick,

The second one is the proper solution. The first one is not feasible because you are trying to create in the same table many fields with the same name.

In fact, your section access is a table like every others but just hidden in your datamodel.

Regards,

Vincent


Peter_Cammaert
Partner - Champion III
Partner - Champion III

An even better solution may be something like this:

Section Access;

LOAD * INLINE [

    ACCESS, NTNAME, LINK

    ADMIN, DOMAIN\ADMIN, *

    USER, DOMAIN\USER1, USR1

    USER, DOMAIN\USER2, USR2

    USER, DOMAIN\USER3, USR3

];


Section Application;


DataPermissionsTable:

LOAD * INLINE [

LINK, Department

USR1, Dept_One

USR1, Dept_Two

USR1, Dept_Three

USR2, Dept_Two

USR2, Dept_Three

USR3, Dept_Three

];

:

This code allows you to put your section access code in a hidden script, while the actual data permissions table can be edited in your regular script (or read from an Excel).

Best,

Peter