Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Section access - exclude just one value!

Hi guys!

I'm trying to implement section access/section application for a sales model.

Basically, I would like that the user could see all the customers except one (to keep all the data and reduce only one customer)!

I would like to have:

1) an admin that can see all the data, (ok, that's easy 🙂

2) some user (sales manager) who can see all the data except one customer.

Suppose to have 4 customers (A,B,C,D) and 2 user who can see (A,B,C) but not D.

How can i complete the section access?

Section Access;

LOAD * INLINE [

    ACCESS, USERID, PASSWORD, (Which command should use here? "OMIT", "REDUCTION", ???)

    ADMIN, ADMIN, ADM1,

    USER, USER1, PSW1, ??? ("NOT D"?, I've tried but doesn't work!)

    USER, USER2, PSW2, ???

];

Section Application;

Help me to complete the code, please!

Thanks soooo much!

1 Solution

Accepted Solutions
hic
Former Employee
Former Employee

There is no simple way to do this. But you can use Generic keys to achieve it:

Data:

Load * inline

[Customer, OtherFields

A,

B,

C,

D,];

AuthorizationBridge:

Load Upper(Customer) as %CUSTOMER,

  Customer

  Resident Data;

Load Upper('<ALL>') as %CUSTOMER,

  Customer

  Resident Data;

Load Upper('<ALL BUT D>') as %CUSTOMER,

  Customer

  Resident Data Where Customer <> 'D';

Section Access;

AuthorizationTable:

Load * inline

[ACCESS, USERID, PASSWORD, %CUSTOMER

ADMIN, ADMIN, ADM1, <ALL>

USER, USER1, PSW1, <ALL BUT D>

USER, USER2, PSW2, <ALL BUT D>];

Read more on

Complex Authorization

Generic keys

HIC

View solution in original post

3 Replies
hic
Former Employee
Former Employee

There is no simple way to do this. But you can use Generic keys to achieve it:

Data:

Load * inline

[Customer, OtherFields

A,

B,

C,

D,];

AuthorizationBridge:

Load Upper(Customer) as %CUSTOMER,

  Customer

  Resident Data;

Load Upper('<ALL>') as %CUSTOMER,

  Customer

  Resident Data;

Load Upper('<ALL BUT D>') as %CUSTOMER,

  Customer

  Resident Data Where Customer <> 'D';

Section Access;

AuthorizationTable:

Load * inline

[ACCESS, USERID, PASSWORD, %CUSTOMER

ADMIN, ADMIN, ADM1, <ALL>

USER, USER1, PSW1, <ALL BUT D>

USER, USER2, PSW2, <ALL BUT D>];

Read more on

Complex Authorization

Generic keys

HIC

Not applicable
Author

Too much complex for my current skills...

Anyway...so interesting! I will working on.

Thanks!

heiko_schmidt
Contributor III
Contributor III

Hello, I solved this problem by creating a new flag field.

I just used if-statement to check the field value.

In your case:

if (customer <> D,'TRUE','FALSE') as Flag.

Admin will see eveything anyways.

USER, USER1, PSW1,TRUE

Of course now your Section Access reduction field will be the new Flag-Field