September 14, 200223 yr 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!)
September 15, 200223 yr 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).
Create an account or sign in to comment