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

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

Recommended Posts

Posted

With function GetField, you can compute the fieldname, and then GetField will get the value of the field with that name. Very useful.

Can you do the same with Go to Field? The normal interface seems to demand you directly specify a field.

Is there any other way to do "Go to the Field whose name is in the global gFieldName"??

(Again, I am trying to avoid cut'n'paste of a long script; but rather simply set gFieldName and then call the one long script that performs the feat on the field named in gFieldName. Huge maintainability win; esp since FMP doesn't even support cut'n'paste!)

Posted

perhaps the following works for you:

define two global text fields, gTmp, and gFieldName. Elsewhere in your scripts, you set gFieldName to the field name you want to go to. then set up a script like this:

Loop

Set Field ["gTmp", "Status(CurrentFieldName"]

Exit Loop If ["gTmp = gFieldName"]

Go to Next Field

End Loop

you may want to add an error trap to prevent an endless loop if, for some reason, gFieldName got set to the name of a text field which isn't on the current layout (like incrementing a counter which stops at 50 with a message).

This topic is 8109 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.