If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.
Hi Team,
I am implementing section access in my application, where I have 2 reduction column.
Section access is working with single reduction column but not working if I put more than 1 reduction column.
When I am putting more than one reduction column, I am getting 'Access Denied' issue.
Here is the script:
SECTION ACCESS;
[CMM_Permission]:
LOAD
ACCESS,
USERID,
GEOKEY,
ZONEKEY,
CITYKEY;
SQL EXECUTE Get_CMM_UserPermissions;
Concatenate
Load * Inline
[
ACCESS,USERID,GEOKEY,ZONEKEY,CITYKEY
USER,INTERNAL/SA_SCHEDULER,*,*,*
];
SECTION APPLICATION;
Note:
All the values and reduction column are in uppercase.
Could anyone help me to identify the issue, why I am getting access denied?
Thanks
Dilip Solanki
Don't know if this link will help:
Can you try using UPPER(yourfieldname) in section access script?
HI Satish,
I have used, it did not worked for me. Although all fields values are in upper case already.
Is that the complete script? If so, the * wildcard does NOT mean every possible value in the database, it means every value listed in the section access script.
Try this
You need to associate the field in section access to the source data.
Please refer here and see if it helps
Identify the lowest level of data and associate the field to section access script in QlikSense.
There is no option in QlikSense to enable/disable security.
Also another note, section access will work only in enterprise version and not in desktop.
See below script for reference
LET vHierarchyDef='Country,State,City';
LET vLevels=Len(KeepChar(vHierarchyDef,',')) + 1;
Section Access;
LOAD * INLINE [
ACCESS, USERID, REDUCTION
ADMIN, US\SATISHKURRA,
USER, US\SALIDINA, ILLINOIS
USER, US\SREEDENON, TEXAS
USER, SK, CHICAGO
];
Section Application;
For vAncLevels= 1 to vLevels
LET vAnc=SubField(vHierarchyDef,',',vAncLevels);
Trees:
LOAD Distinct
UPPER([$(vAnc)]) as REDUCTION,
[EmployeeGroup]
Resident Link;
Next vAncLevels
Notes from above script
1. This script will reduce the data based on hierarchy level (Country, State and City). If your data do not have hierarchy, specify the column name in vHierarchyDef variable (For example if you want to reduce data only to Country level, only specify Country
2. For ADMIN, REDUCTION column is empty, means access to all data
3. SALIDIN is able to see only data for ILLINOIS state
4. SK is able to see only data for Chicago city
Another important note, if by any chance your load failed, you can still enter into the script by right clicking the app in work folder (hub) and click open without data and perform changes.
If you face any difficulty, please let us know
Thanks
Satish
Note: Link provided by Carlos is a good starting point to implement security in QS
Good luck!
Could you provide a little more detail on this approach?
I am trying to do something similar with an Area ,District ,Locale approach.
I was not sure what to reference where you have the Link table and the [Employee Group] field.
Hi Dilip,
Can't you just combine values from 2+ columns into one with the delimiter like "|" and name it REDUCTION field on both sides, Section Access table and the Fact table?
LOAD
ACCESS,
USERID,
GEOKEY & "|"& ZONEKEY & "|"& CITYKEY as REDUCTION
SQL EXECUTE Get_CMM_UserPermissions;
And the same on the Fact table site:
Fact:
LOAD
*,
GEOKEY & "|"& ZONEKEY & "|"& CITYKEY as REDUCTION
FROM Fact.qvd
Try, maybe that will work for you.
Regards,
Maciek
Thanks, it was helpful