Qlik Community

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

slondono
Contributor II

Section Access REDUCTION example

Hi experts

Im trying to deploy an app with section access.

I have the field Year with values 2011, 2012...2016.

Now, i need user A see only 2011, user B see only 2015.

Im doing this:

LOAD * INLINE [

ACCESS, USERID, YEAR

ADMIN, domain\admin, *

USER, domain\A, 2011

USER, doman\B, 2015

];

But its not working... what do i need?? help please im desperate

Tags (2)
8 Replies

Re: Section Access REDUCTION example

Im doing this:

LOAD * INLINE [

ACCESS, USERID, YEAR

ADMIN, DOMAIN/ADMIN, *

USER, DOMAIN\A, 2011

USER, DOMAIN\B, 2015

USER, DUMMY, 2012

USER, DUMMY, 2013

USER, DUMMY, 2014

USER, DUMMY, 2016

];

Go to Settings -- Document Properties -- Opening

Tick All Three

Initial Data Reduction Based on Section Access

Strict Exclusion

Prohibit Binary Load

slondono
Contributor II

Re: Section Access REDUCTION example

But Qlik Sense does have that option?? where?? i know qlik view does.

Re: Section Access REDUCTION example

Try only this...

LOAD * INLINE [

ACCESS, USERID, YEAR

ADMIN, DOMAIN/ADMIN, *

USER, DOMAIN\A, 2011

USER, DOMAIN\B, 2015

USER, DUMMY, 2012

USER, DUMMY, 2013

USER, DUMMY, 2014

USER, DUMMY, 2016

];

slondono
Contributor II

Re: Section Access REDUCTION example

Thats what im doing but its not working I think i need to make a relation between the Reduction field and the true field...but im not sure how.

Re: Section Access REDUCTION example

Have you added DUMMY as per my example?

shwetagupta
Contributor

Re: Section Access REDUCTION example

Hi,

Please create a link between your inline year field and year field available in your data file

create

SECTION APPLICATION section where you should provide its link with the resident table. So that section access should know from which field data  need to be reduced.

Note: keep everything in capitals.

I hope this will help

slondono
Contributor II

Re: Section Access REDUCTION example

Hi, solved.

I had to duplicate the reduction field.

My model have a field Date(x) as Year...so i duplicate this to Date(x) as YEAR and now its working. The result script is this. Hope it will be usefull for someone else

Section access;

LOAD * INLINE [

ACCESS, USERID, Year

ADMIN, SERVIDOR\UserA, 2015

ADMIN, SERVIDOR\UserB, 2011

USER, SERVIDOR\UserC, 2013

USER, INTERNAL\SA_SCHEDULER,*

];

Section Application;

Not applicable

Re: Section Access REDUCTION example

Hi all,

Please use the below logic to solve your problem:

"As the same internal logic that is the hallmark of Qlik Sense is also used in the access section, the security fields can be put in different tables. All the fields listed in LOAD or SELECT statements in the section access must be written in UPPER CASE. Convert any field name containing lower case letters in the database to upper case using the Upper function before reading the field by the LOAD or SELECT statement"

SECTION ACCESS;

LOAD

*

INLINE [

    ACCESS, USERID,YEAR

   

ADMIN, SERVIDOR\UserA, 2015

ADMIN, SERVIDOR\UserB, 2011

USER, SERVIDOR\UserC, 2013

USER, INTERNAL\SA_SCHEDULER,*

];

SECTION APPLICATION;

Table_includes_Year_field:

Load [Year],

  Upper([Year]) AS YEAR

Resident [YourTable];