Skip to main content
Announcements
SYSTEM MAINTENANCE: Thurs., Sept. 19, 1 AM ET, Platform will be unavailable for approx. 60 minutes.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to control the access on the sheet level

Hi,

Can we control the access on the sheet level?

For example:

A could access Sheet1 and B could access Sheet2.

Is it possible?

Thanks.

1 Solution

Accepted Solutions
Not applicable
Author

Login with userid=3, then set the sheet properties---Conditional Show---

=Sum(if(SHEETID='SH01',1,0))>=1

=Sum(if(SHEETID='SH02',1,0))>=1

and In Settings--Document Properties--Opening check the Initial Data reduction based on section Access





View solution in original post

11 Replies
vgutkovsky
Master II
Master II

Yes, this is possible. You can use Section Access to reduce a flag value and then hide the sheet based on the max value. For example:

Section Access;

LOAD * INLINE [
ACCESS,USERID,PASSWORD,FIELDA
USER,USERA,1234,1
USER,USERB,4567,2
];

Then you can hide the sheet by using the fieldindex() function (see Help for more details). Alternatively, you can set a variable by using the QVUSER() function and use nested IFs. You would still need section access to get the user to logon (or use the OSUSER() function if that's acceptable). Then the sheet would be hidden based on the variable. I personally prefer this 2nd solution because it is more straightforward.

Regards,

Not applicable
Author

S ,it is possible using section Access,

find the attached appln.

user id for login :1,2,3

Not applicable
Author

Hi,

Could you paste the code directly? Thanks.

Not applicable
Author







Section

Access;

Section Access;

LOAD * INLINE [
USERID, ACCESS
1, user
2,user
3,admin
];

section application;

Load * INLINE [
USERID,SHEETID
1,SH01
2,SH02
3,SH01
3,SH02
]





Not applicable
Author

Thanks,

But how to control userid just could see the SH01?

How to write the control visibility of the SH01 by expression?

Thanks.

Not applicable
Author

I use the code you provided, USERID still could sheet2(SH02), is there anything else I need to config?

Thanks.

Not applicable
Author

Login with userid=3, then set the sheet properties---Conditional Show---

=Sum(if(SHEETID='SH01',1,0))>=1

=Sum(if(SHEETID='SH02',1,0))>=1

and In Settings--Document Properties--Opening check the Initial Data reduction based on section Access





Not applicable
Author

Many thanks, and another question, why do you put great than(>) sign into this expression? I think this expression is also equal to 1 if some one has access.

Could you help me out?

Not applicable
Author

s,it will work