Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Highlighted
asb02512
New Contributor III

how to write section access for the shown data

hello all

please help me regarding the section access

i have filter pane in which sample data is this

ITEM1

ITEM2

ITEM3

ITEM4

ITEM5

i have 4 users (user 1 and user 2 should view all the data)

but hide the data ITEM4 and ITEM5 for user 3 and user 4 .

this will be possible using section access. please help me regarding this .......

8 Replies

Re: how to write section access for the shown data

Hi,

Once clarification, Is ITEM1 a value of a field or a Field itself?

Regards,

Kaushik Solanki

Chanty4u
Esteemed Contributor III

Re: how to write section access for the shown data

Hi,

Script will be same for Qlikview and Qliksense Please find the below link

QlikView Section Access Examples

asb02512
New Contributor III

Re: how to write section access for the shown data

GHG.png

asb02512
New Contributor III

Re: how to write section access for the shown data

i have data like this

requirement is to hide the ITEM1, 2, 3, from some users

same with vendors also need to hide first three vendors from some users

Partner
Partner

Re: how to write section access for the shown data

I hope to help you with this,

star is *;

SECTION Access;

LOAD * INLINE [

    ACCESS, NTNAME, FIELDNAME

    ADMIN, UserName1, *

    ADMIN, UserName2, *

    USER,  UserName3, ITEM4

    USER,  UserName3, ITEM5

    USER,  UserName4, ITEM4

    USER,  UserName4, ITEM5


];

Section Application;

//The FIELDNAME field in upper case must be in the previously loaded model

//The values, for example UserName1, represent to the users in the server (qlikserver\user)

//The character '*' represent all values

Best regards,

German

Re: how to write section access for the shown data

Hi,

You can have a look at the section access script. Have a look at below link.

https://community.qlik.com/docs/DOC-1853

QlikView Section Access Examples

Section Access

Regards,

Kaushik Solanki

asb02512
New Contributor III

Re: how to write section access for the shown data

Dear German

thanks a lot for your Solution. but using your solution of access the result is it excludes all the items only displaying ITEM4 and ITEM 5 in user 3 and 4 but the requirement is opposite to this . we should hide the ITEM 4 and ITEM5 from the USER 3 USER 4. we have to OMIT the iTEM 4 and 5.

when i am adding OMIT  and loading the data access to the application is getting denied.

Khan_Mohammed
Honored Contributor II

Re: how to write section access for the shown data

Just a little tweak to German's solution

star is *;

SECTION Access;

LOAD * INLINE [

    ACCESS, NTNAME, FIELDNAME

    ADMIN, UserName1, *

    ADMIN, UserName2, *

     ADMIN, UserName1, ITEM4

     ADMIN, UserName1, ITEM5

    USER,  UserName3, ITEM1

     USER,  UserName3, ITEM2

     USER,  UserName3, ITEM3

    USER,  UserName4, ITEM1

     USER,  UserName4, ITEM2

     USER,  UserName4, ITEM3


];

Section Application;

/// Use this script if you loading in QMC

star is *;

SECTION Access;

LOAD * INLINE [

    ACCESS, NTNAME, FIELDNAME

    ADMIN, UserName1, *

    ADMIN, UserName2, *

     ADMIN, UserName1, ITEM4

     ADMIN, UserName1, ITEM5

    USER,  UserName3, ITEM1

     USER,  UserName3, ITEM2

     USER,  UserName3, ITEM3

    USER,  UserName4, ITEM1

     USER,  UserName4, ITEM2

     USER,  UserName4, ITEM3


];

Load * Inline [

ACCESS, NTNAME, FIELDNAME

ADMING, DOMAIN\SERVICEACCOUNT, *  //You'd need to replace these fields with your Service Account NTNAME

];

Section Application;