Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
paulwalker
Creator III
Creator III

restrict one country using section access in qlik sense for few users

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!

Labels (2)
4 Replies
David_Friend
Support
Support

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;

paulwalker
Creator III
Creator III
Author

Is there any way to restrict one country for specific users?

Please let me know if it is possible or not?

David_Friend
Support
Support

@paulwalker did you check your question using ChatGPT etc. SA can be pretty tricky, I am not an expert on it by any means!

Kushal_Chawda

@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;