Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 7018 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

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

Posted

Andrew:

You can put the parameter outside of the GoToField[] step. In other words :

If (YourParameter=x)

GoToField(A)

ElseIf (YourParameter=y)

GoToField(:P

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

Posted

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.

Posted

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

Posted

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(:P

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.

This topic is 7018 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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.