September 8, 200520 yr Hi, I'd like to make a script that allows me to go to the field set in the script parameter. There doesn't seem to be an option to specify the field that you're going to as a calculation in the Go To Field script step. Any ideas? Thanks, Andrew
September 8, 200520 yr Andrew: You can put the parameter outside of the GoToField[] step. In other words : If (YourParameter=x) GoToField(A) ElseIf (YourParameter=y) GoToField( ElseIf (YourParameter=z) GoToField© Else GoToField(D) EndIf Of course, that's not very flexible, but I'm still on my first cup of tea after an all-night get-the-job-done session, so I'm still a bit groggy. -Stanley
September 8, 200520 yr Author Yeah, unfortunately this needs to be a more flexible script than that. The purpose of the script is to only allow certain people access to fields. A restricted access field has a script attached that first checks if they have a sufficient rank, and then takes them to the field being clicked. The rank and field both need to be set as script parameters. If anyone has a better suggestion for accomplishing this task, I'd love to know.
September 8, 200520 yr If I can ask, why aren't you using Accounts and Privilege to to restict access and using test of the account name or privilege set in your script. If you use scripting to control access, what happens if the script breaks or bombs? Do restricted users get access to fields they shouldn't? Just curious
September 8, 200520 yr Presumably, you're wanting this functionality so you can limit access to particular fields. While it is usually preferable to do this type of thing by limiting a particular privilege set's access to the record, I can see cases when you might want the users in that privilege set to have access when on one layout, but not on another. In a case like this, you could use the technique stanley outlined, but add some additional criteria to the conditions to allow or deny access. If [ YourParameter=x and ( get(PrivilegeSetName) = "Admin" or get(PrivilegeSetName) = "Clerk" ) ] GoToField(A) ElseIf [ YourParameter=y and ( get(PrivilegeSetName) = "Admin" or get(PrivilegeSetName) = "Student" ) ] GoToField( ElseIf [ YourParameter=z and ( get(PrivilegeSetName) = "Admin" or get(PrivilegeSetName) = "Clerk" ) ] GoToField© EndIf This script would be used only on those layouts where you wish to limit access. Of course, you could alternatively build these conditions into the privilege set's record level access, using a global or the layout name/number to decide for each privilege set whether or not to allow access. The scripted method is probably easier to debug, but doing it all within the Access Privileges is more secure.
Create an account or sign in to comment