Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
Namita
Contributor
Contributor

Section access not working

Hi All,

I am new to qliksense and working on Section Access. 

In my case, if a User opens the application he can also see the whole data which shouldnt be the case.

Not sure where I m going wrong.

Can anyone help me ?

This is my code:

 

UsersTest:
LOAD distinct Id as SECTION_ACCESS_KEY,
User as Username

Left join (UsersTest)
LOAD Name as Username,
PSID,
Domain & '\' & PSID as USERID,
'USER' as ACCESS

Users:
LOAD UserTestId as SECTION_ACCESS_KEY,
UserId as PSID

Left Join (Users)
LOAD PSID,
Domain & '\' & PSID as USERID,
'USER' as ACCESS

Concatenate (Users)
Load SECTION_ACCESS_KEY,
USERID,
ACCESS
Resident UsersTest;
Drop Table UsersTest;

Concatenate (Users)
LOAD Id as SECTION_ACCESS_KEY,
'INTERNAL\ADMIN' as USERID,
'ADMIN' as ACCESS

Concatenate (Users)
LOAD '*' as SECTION_ACCESS_KEY,
'INTERNAL\SA_SCHEDULER' as USERID,
'ADMIN' as ACCESS
AutoGenerate 1;

Section Access;
SA:
LOAD distinct
USERID,
ACCESS,
If(ACCESS='ADMIN, '*', SECTION_ACCESS_KEY) as SA_KEY
Resident Users;
Section Application;
Drop table Users;

1 Solution

Accepted Solutions
miskinmaz
Creator III
Creator III

How SA_KEY has been associated with your main fact table.

can you post the data model?

 

View solution in original post

5 Replies
micheledenardi
Specialist II
Specialist II

Remove INTERNAL\ADMIN' load, is not needed.

Are all values of the fields in your final table SA written in uppercase?

Michele De Nardi
If a post helps to resolve your issue, please accept it as a Solution.
Namita
Contributor
Contributor
Author

Yes all are in Uppercase.

micheledenardi
Specialist II
Specialist II

Try to add Star is *; after Section Access; statement.

Is not a best practice to create/modify fields during the creation of section access table so try to move the field If(ACCESS='ADMIN, '*', SECTION_ACCESS_KEY) as SA_KEY before section access; statement and then create your table SA by loading the information ready to be used.

Alternatively try to comment Section Access; statement and check if the keys between your datamodel and SA table are correct.

Michele De Nardi
If a post helps to resolve your issue, please accept it as a Solution.
miskinmaz
Creator III
Creator III

How SA_KEY has been associated with your main fact table.

can you post the data model?

 

Namita
Contributor
Contributor
Author

Hi,

Thanks for highlighting the Data Model part.

I got where I was going wrong. Thanks the issue is resolved now.