Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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!
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
HIC
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
HIC
Too much complex for my current skills...
Anyway...so interesting! I will working on.
Thanks!
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