Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

hassansm
New Contributor II

How to implement section access in Qliksense App

Hi,

Can you please share the step by step information for implementing section access control in Qliksense app. i have the following table and scenario.

I want COO and Finance Department person to access all the division data, however for production and commercial department should have access to only their division data.

  

Division
Div_idCode Name
1PProduction
2FFinance
3CCommercial

Fact table

Trn _idDiv_IdValue
1111000
1214000
1326000
1435000
1534000

It would be great help, if you can share the information.

Thanks,

Hassan

8 Replies
davidstorek
Contributor III

Re: How to implement section access in Qliksense App

Hi,

use it as following

On very beginning of script place this

    section access;

LOAD * inline [
ACCESS, USERID,Div_id
ADMIN, AD_DOMAIN\COO,*
ADMIN, AD_DOMAIN\FinanceUser1,*
USER, AD_DOMAIN\ProductinUser1,1
USER, AD_DOMAIN\CommercialUser1, 3
ADMIN, INTERNAL\SA_SCHEDULER,*
];

section application;

All your tables go here.

If you want to manage section acces by external e.g. excel spreadsheet you can use it instead of inline tale.

Hope it is clear

davidstorek
Contributor III

Re: How to implement section access in Qliksense App

agigliotti
Honored Contributor II

Re: How to implement section access in Qliksense App

you can use the below script;

SECTION ACCESS;

TEST:

LOAD *

INLINE [

ACCESS, USERID,                         SA_DIV

USER, AD_DOMAIN\COO, ALLVALUES

USER, AD_DOMAIN\FinanceUser1, ALLVALUES

USER, AD_DOMAIN\ProductinUser1,1

USER, AD_DOMAIN\CommercialUser1, 3

ADMIN, INTERNAL\SA_SCHEDULER,*

];

SECTION APPLICATION;

STAR IS '*';

tab1:

load

     SA_DIV,

     SA_DIV as DIV

resident TEST where SA_DIV <> 'ALLVALUES';

concatenate

load

     SA_DIV,

     '*' as DIV

resident TEST where SA_DIV = 'ALLVALUES';


STAR IS;

//where DIV is your data model field in section application for data reduction.

Hope it helps.

hassansm
New Contributor II

Re: How to implement section access in Qliksense App

Hi,

Thanks for your solution, i will apply your suggestion and test.

I have one more query,let say i want to give "CommercialUser1" access to production and commercial division data.in this case do i need to write the script as below.


section access;

LOAD * inline [

ACCESS, USERID,Div_id

ADMIN, AD_DOMAIN\COO,*

ADMIN, AD_DOMAIN\FinanceUser1,*

USER, AD_DOMAIN\ProductinUser1,1

USER, AD_DOMAIN\CommercialUser1, 1

USER, AD_DOMAIN\CommercialUser1, 3

ADMIN, INTERNAL\SA_SCHEDULER,*

];

hassansm
New Contributor II

Re: How to implement section access in Qliksense App

Hi,

Can you please clarify the following from your scripts.

Why you are using ALLVALUES in SA_DIV column, my division master table doesn't have ALLVALUES

arvind1494
Contributor III

Re: How to implement section access in Qliksense App

SECTION ACCESS;

TEST:

LOAD *

INLINE [

ACCESS, USERID,                         SA_DIV

USER, AD_DOMAIN\COO, ALLVALUES

USER, AD_DOMAIN\FinanceUser1, ALLVALUES

USER, AD_DOMAIN\ProductinUser1,1

USER, AD_DOMAIN\CommercialUser1, 3

ADMIN, INTERNAL\SA_SCHEDULER,*

];

SECTION APPLICATION;

agigliotti
Honored Contributor II

Re: How to implement section access in Qliksense App

ALLVALUES means you see all data.

davidstorek
Contributor III

Re: How to implement section access in Qliksense App

Hi,

exactly like this