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: 
Not applicable

Multiple Section Application in Section Access???

Hi Everyone,

Right, with Henricks help a couple of weeks ago, I managed to get Section Access up and running, and it works really well. Here is the code for that:

Section Access;

LOAD

UPPER(ACCESS) AS ACCESS,

UPPER(NTNAME) AS NTNAME,

UPPER(REGION) AS %REGION;

SQL

SELECT

ACCESS,

NTNAME,

REGION

FROM tblSalesLogixSectionAccess;

Section Application;

LOAD * INLINE [

%REGION, Country

<ALL>, UK

<ALL>, Denamrk

<ALL>, Sweden

<ALL>, Norway

<ALL>, Germany

<ALL>, Spain

<ALL>, Portugal

<ALL>, France

<ALL>, Holland

<ALL>, Luxembourg

<ALL>, Belgium

<ALL>, USA

<ALL>, Canada

<ALL>, Australia

<ALL>, New Zealand

<ALL>, Singapore

UK, UK

DENMARK, Denmark

SCANDINAVIA, Denmark

SCANDINAVIA, Norway

SCANDINAVIA, Sweden

NORWAY, Norway

SWEDEN, Sweden

GERMANY, Germany

SPAIN, Spain

PORTUGAL, Portugal

IBERIA, Spain

IBERIA, Portugal

FRANCE, France

BELGIUM, Belgium

HOLLAND, Holland

LUXEMBOURG, Luxembourg

BENELUX, Belgium

BENELUX, Holland

BENELUX, Luxembourg

USA, USA

CANADA, Canada

AUSTRALIA, Australia

AUSTRALIA, New Zealand

AUSTRALIA, Singapore

NEW ZEALAND, New Zealand

SINGAPORE, Singapore

];

But now, I have had another request:

a)Their whole Country - (All ready done with existing code)
b)Accounts where they are the Account Manager only - (Most Junior level)
c)Accounts where the Account Manager reports to the logged in user - (Middle Level)

In short, can I add further Section Applications in order to limit the data? I was thinking of doing something like the following, placing it underneath the original Section Application code above:

Section Application;

LOAD  [

%NTNAME, AccountID];

SQL SELECT NTNAME, ACCOUNTID FROM SQLDATA

Section Application;

LOAD  [

%NTNAME, AccountManagerID];

SQL SELECT NTNAME, ACCOUNTManagerID FROM SQLDATA

Is this the right thing to do?

Kind Regards,

Miles

1 Solution

Accepted Solutions
Not applicable
Author

Hi Everyone, thanks for your help.

As a result to the answers I have received, I have decided to rethink about where the Section Access is Applied to, and at what level. It's taken a bit of brain scratching, but I have got there in the end. Many thanks again to you both who have taken the time to reply,

A little advice for anyone reading this post - Section Access can be very cool, but take the time to think about how you want your data to be viewed and by whom, it's a bit of a pain to unravel it once you have got it up and running!

Kind Regards,

Miles

View solution in original post

3 Replies
Not applicable
Author

Hi,

When implementing security at the document, as far as I have known, there can only be two parts - each of which defined only once:

1. Section Access : This statement tells the QVW to look up for security credentials while opening the application.

2. Section Application:

When you define the Section Application statement, you are telling the application to treat everything following this statement as one block of code. This block of code is then dependent on Section Access for security. So, it is not logically possible to break this block of code into two such that each block has its own Section Access and Section Application statements in a single QlikView document, unless community experts think and know otherwise.

This approach would only work if you could break this (like using an unqualify statement after a qualify) but then it does not seem to be a possibility.

Hope that helps.

Regards,

-Khaled.

IAMDV
Luminary Alumni
Luminary Alumni

Hi Miles,

I don’t think you can have multiple instances of Section Access scripts within your application. However, you can concatenate your new access request to your original Section Access code. You can use a simple Concatenate Load.

Thanks,

DV

www.QlikShare.com

Not applicable
Author

Hi Everyone, thanks for your help.

As a result to the answers I have received, I have decided to rethink about where the Section Access is Applied to, and at what level. It's taken a bit of brain scratching, but I have got there in the end. Many thanks again to you both who have taken the time to reply,

A little advice for anyone reading this post - Section Access can be very cool, but take the time to think about how you want your data to be viewed and by whom, it's a bit of a pain to unravel it once you have got it up and running!

Kind Regards,

Miles