Skip to main content
Announcements
Global Transformation Awards! Applications are now open. Submit Entry
cancel
Showing results for 
Search instead for 
Did you mean: 
alliedarmour
Contributor III
Contributor III

Qlik Sense Section Access - Missing Field Values

Basically I'm trying to implement section access via the QlikSense Load Script.

This is my current code (I changed the names and some field names):

Star is *;
Section Access;

// Allgemeiner Zugang zur Applikation
Berechtigungen:
Load * Inline [
ACCESS, USERID, REDUCTION, OMIT
ADMIN, INTERNAL\SA_SCHEDULER, * ,
ADMIN, AD\USER1, *,
ADMIN, AD\USER2, *,
ADMIN, AD\USER3, TEST,
];

Concatenate (Berechtigungen)
Load
'USER' As ACCESS,
User As USERID,
If("MVZ Kürzel" = 'MUKM2', 'MUKM', "MVZ Kürzel") As REDUCTION,
'' As OMIT
From [lib://X-Berechtigungen/Berechtigungen.xlsx]
(ooxml, embedded labels, table is MVZ)
Where Aktiv = 'ja';

Section Application;

// Verbindung der MVZ-Felder für den Zugriff.
MVZ_Security:
Load Distinct
Upper([MVZ-Kürzel]) As REDUCTION,
[MVZ-Kürzel]
From [lib://MVZ-Sense/DVMvz.xlsx]
(ooxml, embedded labels, table is [Access]);

 

So, I am USER1 and (from my understanding) should be allowed to see all values of the REDUCTION field which are present in the access table - which should be TEST and the values I loaded from the Excel file.

If I switch the REDUCTION field for USER3 to *, this works. But if I run this like you see above, I am also limited to just the TEST value for the reduction field, although I loaded the remaining possible values from the Excel file and concatenating them afterwards - what am I missing here?

Thanks!

 

 

Labels (1)
2 Solutions

Accepted Solutions
vincent_ardiet_
Specialist
Specialist

Maybe could you do test removing the section access keyword in order to check what is really loaded in [Berechtigungen]?

View solution in original post

alliedarmour
Contributor III
Contributor III
Author

Okay,  I just found out myself 😅.

So, just in case anyone else finds himself in this situation:

The problem is the Where clause when loading the Excel-file. QS converts every field to uppercase when used in the section access, so instead of 

Where Aktiv = 'ja';

You'd have to use (just added the UPPER for clarification reasons):

Where Upper(Aktiv) = 'JA';

 This way, my script is working just as it should.

Nevertheless thanks for your input!

View solution in original post

4 Replies
marcus_sommer

What happens if your revers the load-order and loading at first from the Excel and then adding the inline-admin-stuff?

agigliotti
Partner - Champion
Partner - Champion

Hi @alliedarmour ,

Could you create a sample qvw document with mock data with the actual vs expected result regarding data reduction per user?
Of course you would need to use only custom users as below:

Section Access;
LOAD * INLINE [
ACCESS, USERID, PASSWORD, NTNAME
USER, USER1, PWD1, *
USER, USER2, PWD2, *
ADMIN, ADMIN, ADM, *
];

vincent_ardiet_
Specialist
Specialist

Maybe could you do test removing the section access keyword in order to check what is really loaded in [Berechtigungen]?

alliedarmour
Contributor III
Contributor III
Author

Okay,  I just found out myself 😅.

So, just in case anyone else finds himself in this situation:

The problem is the Where clause when loading the Excel-file. QS converts every field to uppercase when used in the section access, so instead of 

Where Aktiv = 'ja';

You'd have to use (just added the UPPER for clarification reasons):

Where Upper(Aktiv) = 'JA';

 This way, my script is working just as it should.

Nevertheless thanks for your input!