Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
Save the Date: QlikWorld Online, June 24-25, 2020. Free global virtual event for data integration and data analytic gurus. Register Today
Highlighted

Re: Section Acess in Qlikview

Correct. I have edited my post from "will" to "could"

Highlighted

Re: Section Acess in Qlikview

Sure. But he mentions that the user gets "logged out" which probably means the strict exclusion is enabled for the document (or there are no NTFS permissions if NTFS is used)

Highlighted
Esteemed Contributor

Re: Section Acess in Qlikview

haha ook

actually I was just curious, maybe there is something else related to section access that can can logout users if there is not matching values.

Thank you

Highlighted
Esteemed Contributor

Re: Section Acess in Qlikview

Sorry didn't pay enough attention..

Highlighted
Partner
Partner

Re: Section Acess in Qlikview

Hi Miguel,

Need your help on this. Please check the below code:

Section Access;

LOAD *, Upper(NTNAME) as User;

LOAD * INLINE [

    ACCESS, NTNAME

    ADMIN, User3

    USER, User2

USER,User1

];

Section Application;

User_Reduction_Data:

LOAD * Inline [

Region, User

USA, User1

German, User2

*,User3

];

Note:When i'm trying to login with User1 and User2 i'm able to see the data for respective regions.

But when i'm trying to login with User3 who is Admin and should see all the regions in QV. Instead of displaying all the regions data for User3 its displaying "*" instead.

Regards,

Puneet Agarwal

Highlighted
Valued Contributor III

Re: Section Acess in Qlikview

add

star is * before loading user_reduction_data

and star is ; after

Highlighted
Partner
Partner

Re: Section Acess in Qlikview

Hi Olivier,

Can you please elaborate?

Highlighted
Valued Contributor III

Re: Section Acess in Qlikview

before your load instruction , add

star is *;

after your load, add

star is;

so that your code looks like :

star is *;

User_Reduction_Data:

LOAD * Inline [

Region, User

USA, User1

German, User2

*,User3

];

star is;

Highlighted

Re: Section Acess in Qlikview

Exactly. The meaning of "*" in section access has been largely discussed, but to follow your example, I would make sure of 2 things

One is that the users can open the app, which seems to be the case.

The other regarding the "*", you need to create a line for each value you want the user to see. If this means all values, you need to create as many lines as values you have. For instance:

// Use field names and field values in UPPERCASE when they are going to be used in section access, always!

User_Reduction_Data:

LOAD * INLINE [

REGION, USER

USA, DIR\USER1

GERMANY, DIR\USER2

];

// Here's the trick: USER3 has access to ALL values in the field REGION

CONCATENATE

LOAD DISTINCT

  REGION

  'DIR\USER3' AS USER

FROM CountryTable.qvd (qvd); // or whatever the source it might be, RESIDENT, XLS, table in SQL, etc.

Let's say you have a new USER4 who should also see ALL countries. Now you can use the "*"

User_Reduction_Data:

LOAD * INLINE [

REGION, USER

USA, DIR\USER1

GERMANY, DIR\USER2

*, DIR\USER4

];

// Here's the trick: USER3 has access to ALL values in the field REGION

CONCATENATE

LOAD DISTINCT

  REGION

  'DIR\USER3' AS USER

FROM CountryTable.qvd (qvd); // or whatever the source it might be, RESIDENT, XLS, table in SQL, etc.

My suggestion when you want to use the "*"  in section access is that you create a dummy value, or use an actual ADMIN user, and do this with him, then you can use the * if you need to. Conceptually, something like

Reduction_Table:

LOAD DISTINCT // the data model may have several repeated values, you only want the distinct ones

  'DIR\DUMMY' AS NTNAME // any actual ADMIN account or a completely fake one

  COUNTRY_CODE

FROM Table.qvd (qvd);

//Real users and admins table

// Users ADMIN and BOSS will see all countries

// User1 only ES

// User2 ES and US

LOAD * INLINE [

NTNAME, COUNTRY_CODE

DIR\ADMIN, *

DIR\USER1, ES

DIR\USER2, ES

DIR\USER2, US

];

Highlighted
Partner
Partner

Re: Section Acess in Qlikview

Thanks so much Olivier

It worked