Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Community,
SECTION ACCESS;
LOAD * INLINE [
ACCESS,USERID,COUNTRY
ADMIN,INTERNAL\SA_SCHEDULER,
USER,User1,
USER,User2,PAK
USER,User3,IND
USER,User4,
USER,User5,AUS
];
Section Application;
This code is working fine for all the users, but here User1 need to exclude NZ (New Zealand) country.
User4 has to see all the countries including NZ.
is there any way to restrict?
Thanks in Advance!
Add a country field and then do -NZ for user1
SECTION ACCESS;
LOAD * INLINE [
ACCESS, USERID, PRODUCT, COUNTRY
ADMIN, INTERNAL\SA_SCHEDULER, *,
USER, User1, *, -NZ
USER, User2, PAK, *
USER, User3, IND, *
USER, User4, *, *
USER, User5, AUS, *
];
SECTION APPLICATION;
Is there any way to restrict one country for specific users?
Please let me know if it is possible or not?
@paulwalker did you check your question using ChatGPT etc. SA can be pretty tricky, I am not an expert on it by any means!
@paulwalker easy way would be to create individual country record for user1 to get access to specific country excluding NZ. Make sure that all field values of all columns in section access are in upper case.
SECTION ACCESS;
data:
LOAD * INLINE [
ACCESS,USERID,COUNTRY
ADMIN,INTERNAL\SA_SCHEDULER,
USER,User1,
USER,User2,PAK
USER,User3,IND
USER,User4,
USER,User5,AUS
USER,User6,NZ
];
Final:
NoConcatenate
Load *
Resident data
where USERID<>'User1';
Concatenate(Final)
Load distinct ACCESS,
'User1' as USERID,
COUNTRY
Resident data
Where COUNTRY<>'NZ' and len(trim(COUNTRY))>0;
Drop Table data;
Section application;