Qlik Community

QlikView Documents

QlikView documentation and resources.

Section Access with a Twist

fashid
Specialist
Specialist

Section Access with a Twist

In this Document I am going to demonstrate a requirement and how to implement the same.

The Requirement:-

First we will get an overview of the application.

I have an application with section access for data security.

The Section access table is shown below.

ACCESS

USER ID

NT NAME

REGION

BRANCH_NAME

CURR

ADMIN

Ray

DOMAIN\ray

ALL

ALL

INR

USER

Nadeem

DOMAIN\nadeem

IND

DEL

INR

USER

Darren

DOMAIN\darren

IND

MUM

INR

Now consider that the application is up and running as required………

1.The user Ray is able to see data for all regions and for all branches under that region.

2.The user Nadeem is able to see data for IND region and the branch DEL under that region.

3.The user Darren is able to see data for IND region and the branch MUM under that region.

All the above users are managers having access to data for their respective branches.

Now out of the blue I have a new requirement to build a scorecard sheet.

This scorecard sheet should display data for the branch manager of that particular branch as well as data of all other branches .


Eg:- When the user Nadeem Logs on he should be able to see data for DEL branch along with all other branches. Similar would be the case for the user Darren.

In order to meet the above requirement I should somehow defy the section access logic already built.

Note:- You would think that I could simply remove section access or change my section access BRANCH_NAME fields to ALL . But I still need the section access for the rest of my sheets in the application, It is just the scorecard sheet where this twist has arrived (hence the title section access with a twist .)

How to meet the requirement:-

  1. First we will have to identify the tables that would be used to create the scorecard KPI.

Let us consider that we have 2 tables and their names are

                                a. Enquiry

                                b. Enquiry_Target

  1. 2.These two tables are currently already loaded in the application.

Now we will again load these tables and use different field names

Eg

the table Enquiry had the following fields in the data model originally

Region,

Branch_name,

Client_city,

Enquiry_id

Reload the tables and rename all the fields as S.branch_name, S.Client_city, S.Enquiry_id except the field region.Similarly perform the operation for the second

Renaming these fields will cause section access to ignore any charts created using these fields in the application.

Now if we use any of the renamed fields like S.Branch_Name in our charts Section acces will not have any effect and all the branches would be displayed because in our section access configuration file we have used field name Branch_name.

Note: We have not renamed Region field because we want section access to only ignore the branch field in the scorecard sheet.test.png

The above screenshot shows that when the user Nadeem logged in, he had access to only DEL branch data hence u see only DEL in the Branch_name list box on the extreme left.

But when the field S.Branch_name is used the user Nadeem can see all the data irrespective of the section access defined for the application.

The goal of this requirement was to see where a particular Branch Manager stands and where other branch managers stand so as to fire up a competition between branches.

Thus our Goal is achieved.

Hope you liked the Content

Labels (2)
Comments
Not applicable

Good document to handle user level security.

fashid
Specialist
Specialist

Thanks Arun 

0 Likes
mithilesh17
Partner
Partner

like to implement it soon.. nice post

fashid
Specialist
Specialist

Thanks Mithilesh

0 Likes
robynrshields
Contributor III
Contributor III

Ni Nadeem,

I can't seem to get this to work.  Would you be able to supply a sample QVW file on how to do this? 

0 Likes
punitpopli
Creator III
Creator III

Nice explanation!!

But, how had you handled the data against different branches for user Nadeem, as in the screenshot the values are only displaying for DEL branch

0 Likes
fashid
Specialist
Specialist

Hi Punit ,

thanks for going through it .

That is what i have mentioned in the document by loading the fact table again and by giving different names to all the fields .

In the screenshot you see two different pages. The left most BRANCH_NAME field is used in the section access hence filtering happens on the field name .

Now in the rightmost section the S.BRANCH_NAME is not used in the section access hence the user nadeem can see all the data in that sheet for that particular KPI.

Regards,

Nadeem Shaikh

0 Likes
fashid
Specialist
Specialist

Unfortunately it was on a live project so i do not have any sample qvw . will try to create one .

0 Likes
HugoR
Contributor II
Contributor II

Exactly what I was looking for.

Great solution, thank you 🙂

0 Likes
Version history
Last update:
‎2015-04-06 07:20 AM
Updated by: