Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
puneetagarwal
Partner - Creator II
Partner - Creator II

Section Acess in Qlikview

Hi All,

We are trying to apply section access at row-level. We've written the NTName and Access and in an excel and loaded in the script for the user and the admin. later we have Enable the check box for "Initial Data Reduction Based on Section Access" from Document Properties.

The Issue is when we are trying to login with user at access point and check the dashboard its not getting logged in and we are getting logged out of QlikView automatically.

Can someone please let me know what is to be done?

Regards,

Puneet Agarwal

23 Replies
Miguel_Angel_Baeyens

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

Miguel_Angel_Baeyens

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)

YoussefBelloum
Champion
Champion

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

YoussefBelloum
Champion
Champion

Sorry didn't pay enough attention..

puneetagarwal
Partner - Creator II
Partner - Creator II
Author

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

olivierrobin
Specialist III
Specialist III

add

star is * before loading user_reduction_data

and star is ; after

puneetagarwal
Partner - Creator II
Partner - Creator II
Author

Hi Olivier,

Can you please elaborate?

olivierrobin
Specialist III
Specialist III

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;

Miguel_Angel_Baeyens

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

];

puneetagarwal
Partner - Creator II
Partner - Creator II
Author

Thanks so much Olivier

It worked