Andrew Q Posted November 2, 2006 Posted November 2, 2006 Hello. I'm trying to use this function to determine which layout a user goes to when they open the file. I would think that is possible using this function but i'm somehow not able to do it. In the file option, i've set it to run the script when opening file. In this script, it goes something like this. If(Get(PrivilegeSetName)="DataEntry") Go to layout "Data Entry Page" Else Go to layout "View Page" End if This doesn't work and I can't figure out whats wrong. I hope someone is able to show me the light. Thanks in advance.
Ender Posted November 2, 2006 Posted November 2, 2006 Make sure you do not have the option "Run script with full access privileges" checked in the bottom of the script window.
Andrew Q Posted November 2, 2006 Author Posted November 2, 2006 Hmm..tried that advice but still doesn't work. I've put my test file up. Maybe someone could show me how it's done? For privilege set Data Entry Only Username:data pass:data Full access Username:admin pass: login.zip
Ted S Posted November 2, 2006 Posted November 2, 2006 Andrew, Ender hit the nail on the head. When you are editing your script look near the lower left corner of the window. There you will find a checkbox that when checked switches ALL users over to FULL ACCESS for the duration of the script.
T-Square Posted November 2, 2006 Posted November 2, 2006 Andrew, Ender-- I just checked the help file for Get(PrivilegeSetName) and it doesn't mention this at all--at least in the help file for FM7. How/where did you guys learn about this? David
Ted S Posted November 2, 2006 Posted November 2, 2006 It is discussed in the help file under: Creating and editing scripts using Script Maker. I guess I picked up on it when it first appeared in version 7. There were quite a few posts on this board and others from users scratching-their-heads.
Ender Posted November 2, 2006 Posted November 2, 2006 If it's important that the script run with Full Access, you can either capture the privilege set in a global or variable prior to entering that script, or use a subscript that's not running with Full Access privileges to do the test.
Andrew Q Posted November 8, 2006 Author Posted November 8, 2006 thanks so much for the tips and answers. I have managed to get it sorted out. I think my mistake was that the privilege set names were case sensitive.
Recommended Posts
This topic is 6592 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now