Qlik Community

QlikView Documents

Documents for QlikView related information.

Sheet Level Security.qvw

Not applicable

Sheet Level Security.qvw

Today, I am going to share a document on
applying Sheet Level Security in Qlikview. Suppose our QV Dashboard have 4 levels of users like
ADMIN  - Who can have access to all sheets
REGION - Only have access to Sheet1
COLLECTOR - Only have access to Sheet2
BROKER - Only have access to Sheet3

Steps to Implement the Sheet Level Security
1. Create a new Dashboard and Save the Document.
2. Go to EDIT SCRIPT
3. In file Menu open INSERT -> Section Access -> Load Inline
4. Copy the code below. Make sure all the code is in UPPER case.

Section Access;
LOAD * INLINE [
    ACCESS, USERID
    ADMIN, ADMIN
    ADMIN, REGION
    ADMIN, COLLECTOR
    ADMIN, BROKER
];

5. So all have the Admin access but they can able to see only their Respective Sheets. You can combine this Security with Field Level Security for restrict the data.

6. Now we have to define, To which sheet they have access. The below code mentione that.

Section Application;

LOAD * INLINE [
    USERID, SHEET1, SHEET2, SHEET3
    ADMIN, 1, 1, 1
    REGION, 1, 0, 0
    COLLECTOR, 0, 1, 0
    BROKER, 0, 0, 1
];

7. Save the application now. and close the Edit Script window.
8. Go to Document Properties -> Opening -> Check the boxes Initial Data Reduction & Strict Exlcusion. So that Qlikview restircts the data based on Section access Script.

I have attached the QVW for the Refrence. One can login using the USERID

Tags (1)
Attachments
Comments
knightwriter
Contributor III

Hi Jhansi,

Very helpful re above.

Going a step further, is it possible to have a number of users access to 1 sheet and within this sheet, depending on permissions, to have this user view only certain options in a list box?

0 Likes
Partner
Partner

use this script

user:

load * inline [USERID

ADMIN

REGION

COLLECTOR

BROKER];

Section Access;

LOAD * INLINE [

    ACCESS, USERID

    ADMIN, ADMIN

    USER, REGION

    USER, COLLECTOR

    USER, BROKER

];

Section Application;

//LOAD * INLINE [

//    USERID, SHEET1, SHEET2, SHEET3

//    ADMIN, 1, 1, 1

//    REGION, 1, 0, 0

//    COLLECTOR, 0, 1, 0

//    BROKER, 0, 0, 1

//];

in any sheets use conditon as

=IF(USERID='ADMIN' or USERID='REGION',1,0) for sheet1

=IF(USERID='ADMIN' or USERID='COLLECTOR',1,0) for sheet2

=IF(USERID='ADMIN' or USERID='BROKER',1,0) for sheet3

Luminary
Luminary

Hi,

In my experience you should not link sheets directly to you security.

It is much better to work with security levels:

Level A: Sheets 1 and 2 enabled

Level B: Sheet 1 enabled

....

This decouples the security from the application and makes it reusable in other applications.

I.e. Level A = CEO Level

Level B = Product Manager Level.

Feel free to send me an email if I need to elaborate.

Kind Regards,

Dion

0 Likes
anantmaxx
Valued Contributor

nice!! THANKS,  we can do this also be using qvuseer() = 'REGION' OR qvuser='ADMIN' IN SHEET1,SHHET2,SHEET3, properties -> conditional .

Thanks

0 Likes
qlikviewwizard
Honored Contributor II

Good info. Thanks for sharing.

0 Likes
maspicak
New Contributor

In QV Desktop, i can see all tabs after pressing  Ctrl+Shift+S as any user logged in. I can also see objects from any sheet when they are embeded in report, which means that user can see data on the server if he has access to any report which uses objects from application with hidden tabs. Is this correct?

0 Likes
vireshkolagimat
Contributor III

Hi, I tried to replicate the same thing but when i open the QVW fiel with userID Region it is still showing all the 3 sheets. I enabled the setting in document properties.

Regards,

Viresh

0 Likes
ahaahaaha
Honored Contributor

Good info. Thanks for sharing.

0 Likes
Not applicable

How can i manage 1000+ users only from the excel file not from the load script? i have a QlikView Application that has more than 15 Sheets, i have created an excel file that i have loaded all 1000+ users, i don't want to update the load script every time a new user is added or they need access to one of the sheets, it is easier for me to open the excel file and update it in excel.

I want the SECTION ACCESS to be 100% controlled from excel NOT from the load inline in QlikView script, obviously the QVW script would have to be reloaded for the excel updates..

0 Likes
manoj217
Contributor III

Today, I am going to share a document on
applying Sheet Level Security in Qlikview. Suppose our QV Dashboard have 4 levels of users like
ADMIN  - Who can have access to all sheets
REGION - Only have access to Sheet1
COLLECTOR - Only have access to Sheet2
BROKER - Only have access to Sheet3

Steps to Implement the Sheet Level Security
1. Create a new Dashboard and Save the Document.
2. Go to EDIT SCRIPT
3. In file Menu open INSERT -> Section Access -> Load Inline
4. Copy the code below. Make sure all the code is in UPPER case.

Section Access;
LOAD * INLINE [
    ACCESS, USERID
    ADMIN, ADMIN
    ADMIN, REGION
    ADMIN, COLLECTOR
    ADMIN, BROKER
];

5. So all have the Admin access but they can able to see only their Respective Sheets. You can combine this Security with Field Level Security for restrict the data.

6. Now we have to define, To which sheet they have access. The below code mentione that.

Section Application;

LOAD * INLINE [
    USERID, SHEET1, SHEET2, SHEET3
    ADMIN, 1, 1, 1
    REGION, 1, 0, 0
    COLLECTOR, 0, 1, 0
    BROKER, 0, 0, 1
];

7. Save the application now. and close the Edit Script window.
8. Go to Document Properties -> Opening -> Check the boxes Initial Data Reduction & Strict Exlcusion. So that Qlikview restircts the data based on Section access Script.

I have attached the QVW for the Refrence. One can login using the USERID

I HAVE USED THIS CODE BUT WHILE OPENING THE  QVW WITH THE  REGION (USERID) IT WILL SHOWS ALL THE SHEETS

0 Likes
Version history
Revision #:
1 of 1
Last update:
‎2015-07-08 09:59 AM
Updated by: