Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Announcements
Qlik® Product Spotlight: Discover what’s possible. Get more from our products.
See for yourself. Register today.
Not applicable

Qliksense + Section Access

Hi all,

I tryed to apply the section access system in qliksense, following this exemple :  http://help.qlik.com/en-US/sense/2.0/Subsystems/Hub/Content/Scripting/Security/dynamic-data-reductio...

I'm trying this :

section access;

LOAD * inline [

ACCESS, USERID,REDUCTION, OMIT

ADMIN, DOMAIN\ADMIN,*,

USER, DOMAIN\B, 2,NUM

USER, DOMAIN\C, 3, ALPHA

];

section application;

T1:

LOAD *,

NUM AS REDUCTION;

LOAD

Chr( RecNo()+ord('A')-1) AS ALPHA,

RecNo() AS NUM

AUTOGENERATE 8;

The reduction works well with user A and B.

But I have an issues with the user ADMIN in this code :

The user ADMIN doesn't see every record :

He can see only Num = 2 and Num=3 ... but I would like him to see ALL record from 1 to 8.

(I tried to set ACCESS to ADMIN and USER but it doesn't wokrs).

Do you know why it's doing that and how I can fix this ?

thank you,

C.

1 Solution

Accepted Solutions
MVP & Luminary
MVP & Luminary

Re: Qliksense + Section Access

You can solve it by leaving the entry blank instead of using a star. By default * means all listed values, not all values.

Alternatively you can put this line above the section access section:

Star = '*';

That will change the default behaviour to make the * mean all values instead of all listed values.


talk is cheap, supply exceeds demand
5 Replies
vincent_ardiet
Contributor III

Re: Qliksense + Section Access

Hi Cyrille,

If it works like in QlikView, * means all possible values declared in the section access, not all possible values in the target table.

So, you have to insert fake users in your section access with values from 1 to 8.

Regards,

Vincent

MVP & Luminary
MVP & Luminary

Re: Qliksense + Section Access

You can solve it by leaving the entry blank instead of using a star. By default * means all listed values, not all values.

Alternatively you can put this line above the section access section:

Star = '*';

That will change the default behaviour to make the * mean all values instead of all listed values.


talk is cheap, supply exceeds demand
Not applicable

Re: Qliksense + Section Access

Thank you both,

the empty field in REDUCTION works fine, using SET Star = '*'; with * again in reduction doesn't work ..

Inserting fake user works also, but my right are based in 5 fields (concatenated)  and there a lot and a lot of combinaisons ....

Anyway, it's working.

Thanks,

C.

vincent_ardiet
Contributor III

Re: Qliksense + Section Access

I think that it's not SET Star='*', but STAR is '*' the correct syntax.

But according to QlikTech this instruction is obsolete (and it doesn't work with field used as key, so not sure it works with a section access table which is used to be linked to other tables).

Regarding the number of combinations, if you build your section access at the end of your script, you just have to concatenate the existing values of your datamodel.

In your example:

section access;

LOAD * inline [

ACCESS, USERID,REDUCTION, OMIT

ADMIN, DOMAIN\ADMIN,*,

USER, DOMAIN\B, 2,NUM 

USER, DOMAIN\C, 3, ALPHA 

];

Concatenate LOAD Distinct 'USER' as ACCESS,'FAKEUSER' as USERID, REDUCTION,NUM Resident T1 ;

But if it works fine with empty value, it's less work

millan123
Contributor II

Re: Qliksense + Section Access

Hi,

IS there is a possibility for restrict the data by county in QMC ?