Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
afbraga1
Creator
Creator

Section Acess in Qlik Sense not working

Hello,

As of late. I've been trying to implement section access on a Qlik Sense application. The code of this application is a complete copy of a Qlikview application. The problem I'm facing is that for whatever reason the section access doesn't work in Sense but it works in View, and I can't understand why. So far, I've search far too many posts and I havent been able to crack it anyway. While executing the code below, I don't get any errors, but when I publish the app and log with 2 different users both of them see all the data, despite one of them having reduced access.

The table below is the excel file template that serves as a template for the construction of excelsegregation.qvd mentioned below in the code. In this excel file a user "testuser" has access to 5 plants. But when I access the published app with it, the user sees more plants than should be possible.

ACCESSNTNAMEPLANTCOD
USERDOMAIN\testuserP111
USERDOMAIN\testuserP222
USERDOMAIN\testuserP333
USERDOMAIN\testuserP444
USERDOMAIN\testuserP555

 

The code below is a reduced representation of what I have, and it doesn't work.

STAR IS *;
SECTION ACCESS;

SecurityTab:
LOAD * INLINE [
ACCESS, NTNAME, USERID, PASSWORD
ADMIN, DOMAIN\QVDEV,*,*
];

JOIN (SecurityTab)
LOAD DISTINCT
UPPER(TRIM(PLANT_COD)) AS PLANT_CODD
FROM [lib://pathfiles (DOMAIN_QVDEV)/Folder1/Plant.qvd](QVD)
WHERE 1 = 1;

CONCATENATE
LOAD UPPER(ACCESS) AS ACCESS,
UPPER(NTNAME) AS NTNAME,
UPPER('*') AS USERID,
UPPER('*') AS PASSWORD,
IF(LEN(UPPER(TRIM(PLANTCOD)))<2,UPPER('*'),UPPER(TRIM(PLANTCOD))) AS PLANT_CODD
FROM [lib://pathfiles (DOMAIN_QVDEV)/Folder1/excelsegregation.qvd](QVD);


SECTION APPLICATION;

M_Plant:
NoConcatenate
LOAD Distinct
Plant_COD,
Plant,
upper(trim(Plant_COD)) as PLANT_CODD
FROM [lib://pathfiles (DOMAIN_QVDEV)/Folder1/Plant.qvd](qvd);

Thank you in advance for any help!

Best regards,

André Braga

Labels (2)
1 Solution

Accepted Solutions
dplr-rn
Partner - Master III
Partner - Master III

2 Replies
dplr-rn
Partner - Master III
Partner - Master III

afbraga1
Creator
Creator
Author

Hello Dili,

Can't believe that was it! I changed the NTNAME to USERID and it worked right away.
I don't think I ever saw that info on Qlik Help and it should be there somewhere, if it isn't.
Thank you!

Best regards,
André Braga