Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

enricocamerin
New Contributor III

Section Access. All users with exception of some

Hello I have an app published  into a stream with let's say 50 users

I want to give access to the entire data set to all user of this stream exception the user1 and user2 who can only see the reduction 1 and 2.

The reduction works fine for user1 and 2 but all the other user of the stream can't see nothing. I thought the condition

USER, *,*,  would solve the problem but probably it's not the correct syntax.  I tried also with USER, NET1\*,*,

thanks for your help

Enrico

section access;

LOAD * inline [

ACCESS, USERID,REDUCTION, OMIT

USER, *,*,

USER, 'NET1\user1', 1,

USER,  'NET1\user2', 2,

ADMIN, INTERNAL\SA_SCHEDULER,*

];

section application;

T1:

load * Inline [

REDUCTION, WORK_SOLUTION_DESC

1, 'trai'

2, 'Jam'

];

Tags (1)
1 Solution

Accepted Solutions
MVP
MVP

Re: Section Access. All users with exception of some

There is none. The "*" in the section access table stands for all values listed under that field in the section access table, not in the data model, so in your example, values 1 and 2 for REDUCTION.

You will need to loop through all possible values, maybe for an ADMIN access, to make the "*" meaning "all possible values".

SECTION ACCESS;

Admins: // Table label for identification purposes, does not have a meaning or use here as it cannot be referred after the "section application" line

LOAD DISTINCT

  'ADMIN' AS ACCESS,

  'INTERNAL\SA_SCHEDULER' AS USERID

  REDUCTION

FROM Reduction.qvd (qvd); // whichever the source of REDUCTION field is

SECTION APPLICATION;

Note that section access can work at any point in the script, you can use RESIDENT to populate the section access table.

5 Replies
passionate
Valued Contributor

Re: Section Access. All users with exception of some

You will have to individually add userid's

wildchar won't work.

enricocamerin
New Contributor III

Re: Section Access. All users with exception of some

Thanks for your fast reply.

I also need that the user 'user4' see all data

if I insert the row

USER,  'NET1\user4', *,

he would see the reduction 1 and 2 but not the entire data set.

is there a way to see all the data for that user regardless of reduction ?

thanks

MVP
MVP

Re: Section Access. All users with exception of some

There is none. The "*" in the section access table stands for all values listed under that field in the section access table, not in the data model, so in your example, values 1 and 2 for REDUCTION.

You will need to loop through all possible values, maybe for an ADMIN access, to make the "*" meaning "all possible values".

SECTION ACCESS;

Admins: // Table label for identification purposes, does not have a meaning or use here as it cannot be referred after the "section application" line

LOAD DISTINCT

  'ADMIN' AS ACCESS,

  'INTERNAL\SA_SCHEDULER' AS USERID

  REDUCTION

FROM Reduction.qvd (qvd); // whichever the source of REDUCTION field is

SECTION APPLICATION;

Note that section access can work at any point in the script, you can use RESIDENT to populate the section access table.

passionate
Valued Contributor

Re: Section Access. All users with exception of some

You can do this via two methods:

1. As mentioned by Miguel keep

    access as Admin and use * as reduction along with star is * at start of script.

2. create a table with all possible values and create a key for it and use this key in section access table.

enricocamerin
New Contributor III

Re: Section Access. All users with exception of some

thanks Miguel and Pankay,

Following you indication my final script works.

in the concatenate part I added a general user with all combination then in the S1 inline table I will add manually each user.

My next step will be how to import automatically the user defined on the stream into the  Section App, but I will open another thread.

section access;

S1:

LOAD * inline [

ACCESS, USERID,REDUCTION, OMIT

USER, NET1\user4,*,

];

concatenate (S1)

load distinct

'ADMIN' as ACCESS,

'INTERNAL\SA_SCHEDULER'  as USERID,

WSN_ID as REDUCTION

resident solution;

section application;

T1:

load distinct

WSN_ID as REDUCTION,

WORK_SOLUTION_DESC

RESIDENT solution;

Community Browser