Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

HOW TO RESTRICT SHEET ACCESS WITH SECTION ACCESS

    sheet1flag section access.PNG

Please see the scriptabove: I want user2 not to access sheet 2 that is named "ASSISTANT" i WANT USER1 to access both "MAIN" & "ASSISTANT" Tabs. I have also restricted sheet properties by going to general and under show conditional, putting ----> SHEET1FLAG>0 FOR MAIN & putting -----> SHEET2FLAG>0 FOR ASSISTANT tabs. I have also attached the qvw here. Please suggest how I can restrcit access at sheet level.

Many Thanks,

D.

1 Solution

Accepted Solutions
maxgro
MVP
MVP

check the 2 flags in image

1.jpg

View solution in original post

8 Replies
maxgro
MVP
MVP

check the 2 flags in image

1.jpg

Not applicable
Author

You are trying to use the USERID field as the reduction field and it's probably not working.  What you want is a different field to act as the reduction field that is tied to the user and the sheets.

It may be as simple as:

Section Access;

Security:

LOAD * INLINE [

ACCESS, USERID, PASSWORD, USERNAME

ADMIN, USER1, ABCD, USER1

USER, USER2, EFGH, USER2

];

Section Application;

SheetAccess:

LOAD * INLINE [

USERNAME, SHEET1FLAG, SHEET2FLAG

USER1, 1,1

USER2, 1,0

];

In  this case above, the USERNAME field is the reduction field.

Now for your conditionals instead of SHEET1FLAG>1 SHEET2FLAG>1 all you really need is SHEET1FLAG=1 and SHEETFLAG2=1.

Hope this helps,

Jeff G

Anonymous
Not applicable
Author

Massimo, your solution worked. Can you please explain how does SHEET1FLAG AND SHEET2FLAG work. I just saw this way of restriction in one of the many youtube videos I am using to educate myself. If you could tell me how this is tied to the authorization process that would be great. And THANK YOU FOR THE HELP.  You hit it on the nail, one more time! have a good one

Anonymous
Not applicable
Author

Thanks Jeffrey. Can you expand on sheet1flag & sheet2flag please

Anonymous
Not applicable
Author

I have 2 sets of question:

1) when i make any change in the the document, QV is asking me to save the file as a new file. If I save it in the same file, the restricted user can not get the access to the file at all. Is this a security feature?

2) If USER2 reloads the document, the restricted tab is visible to him. is this a security feature? so i have to uncheck allow user reload in the doc properties..? what is the purpose of this

Not applicable
Author

Hi John,

Either approach will work, but since you are setting up binary flags for sheet visibility your rule only needs to evaluate equivalency.  If sheet1flag=1, then 1=1 therefore visible.  If sheet2flag=0 then 0<>1 therefore invisible. 

As far as how the initial reduction is tied to authorization, user context is sent into the app by the login process your app will trigger because you are using USERID and PASSWORD.  If you are using NTNAME, Qlik will automatically use Windows credentials if you are running on desktop, thus no additional login.  If you are using QlikView embedded into a host application you will want to use NTNAME so that when auth information is sent to QlikView it picks it up automatically and sends it into the app for data reduction.

Here are some additional links on Section Access:

http://community.qlik.com/docs/DOC-1853

QlikView Section Access Examples

Sheets Security with Section Access

Not applicable
Author

When you implement section access you have to close the document and open it again in Windows to apply the section access you created in script.

Anonymous
Not applicable
Author

Thanks Jeff