Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
slondono
Partner - Creator II
Partner - Creator 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

8 Replies
MK_QSL
MVP
MVP

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
Partner - Creator II
Partner - Creator II
Author

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

MK_QSL
MVP
MVP

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
Partner - Creator II
Partner - Creator II
Author

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.

MK_QSL
MVP
MVP

Have you added DUMMY as per my example?

shwetagupta
Partner - Creator II
Partner - Creator II

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
Partner - Creator II
Partner - Creator II
Author

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

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];