Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

dilip_solanki
Contributor

Section access is not working with multiple reduction access

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

5 Replies
rittermd
Honored Contributor

Re: Section access is not working with multiple reduction access

Don't know if this link will help:

Data Reduction Using Multiple Fields

satishkurra
Valued Contributor II

Re: Section access is not working with multiple reduction access

Can you try using UPPER(yourfieldname) in section access script?

dilip_solanki
Contributor

Re: Section access is not working with multiple reduction access

HI Satish,

I have used, it did not worked for me. Although all fields values are in upper case already.

MVP
MVP

Re: Section access is not working with multiple reduction access

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.

satishkurra
Valued Contributor II

Re: Section access is not working with multiple reduction access

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!