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

trying to hide a sheet for some users ....

Hi There,

I am trying to hide some/show sheets for different users.
I think I am on the right way but I doesn't seem to work.

I am using this script:

Section Access;


Wachtwoorden:

LOAD * INLINE [

ACCESS, USERID, PASSWORD, PROFILE

Admin, admin, admin, admin

User, user1, user1, User1

User, user2, user2, User2

];

Section Application;

Profile:

LOAD * INLINE [

PROFILE, SH01, SH02, SH03, SH04

Admin, 1, 1, 1, 1

User1, 1, 1, 0, 0

User2, 1, 0, 1, 0

];

And in the sheet proporties (show sheet conditional) I use:

SH04 <>0

What I want in the attached file is when I open it with admin/admin it will show the sheet and when I open it with User1/User1 it would not show the sheet.

I am close right?



1 Solution

Accepted Solutions
vgutkovsky
Master II
Master II

Actually, I think your show condition is not really the problem. You should not be seeing 0 and 1. I'm guessing you didn't check "Initial Reduction Based on Section Access" in Document Properties --> Opening. Log in as admin, check that box, reload again and see if the problem is fixed. Also, PROFILE is case sensitive and everything must be written in caps for reduction fields. Here is what your final script should look like:


Section Access;
LOAD * INLINE [
ACCESS,USERID,PASSWORD,PROFILE
ADMIN,admin,admin,ADMIN
USER,user1,user1,USER1
USER,user2,user2,USER2
];
Section Application;
Profile:
LOAD * INLINE [
PROFILE,SH01,SH02,SH03,SH04
ADMIN,1,1,1,1
USER1,1,1,0,0
USER2,1,0,1,0
];


Regards,

View solution in original post

6 Replies
vgutkovsky
Master II
Master II

I think you're close, yes. First, verify that section access is working by creating a listbox of SH04 when logged on as Admin. You should only see '1' listed. Then you can use the fieldindex function in your sheet Layout tab to check for existing values of SH04.

Regards,

Anonymous
Not applicable
Author

Thanks for the quick respons.

When I make a list box logged on as Admin, it shows 1 and 0. That must be the problem right?
Because when I logged on as Admin1 it shows the same.

When I select the 0 in that list box the sheet is gone, so that looks good, but I think I must be doing something wrong...........

vgutkovsky
Master II
Master II

Actually, I think your show condition is not really the problem. You should not be seeing 0 and 1. I'm guessing you didn't check "Initial Reduction Based on Section Access" in Document Properties --> Opening. Log in as admin, check that box, reload again and see if the problem is fixed. Also, PROFILE is case sensitive and everything must be written in caps for reduction fields. Here is what your final script should look like:


Section Access;
LOAD * INLINE [
ACCESS,USERID,PASSWORD,PROFILE
ADMIN,admin,admin,ADMIN
USER,user1,user1,USER1
USER,user2,user2,USER2
];
Section Application;
Profile:
LOAD * INLINE [
PROFILE,SH01,SH02,SH03,SH04
ADMIN,1,1,1,1
USER1,1,1,0,0
USER2,1,0,1,0
];


Regards,

Anonymous
Not applicable
Author

Yes that's it!

Thank you mr Vlad Gutkovsky 🙂

Not applicable
Author

hello..

in the syntax u have PROFILE field

what is that for?

thx..

Not applicable
Author

HI Vlad,

if i have lessthan 10 user no problem,

suppose i have 1000 users then what will we do..

Thanks