There is no: Perform Script [ by name ] ability, as yet anyway. About the best you can do is to create a series of
If [ something = "something" ]
Perform Script [ "Something" ]
Else If [ something = "something else"
Perform Script [ "Something Else" ]
Or, if there are only minor variations in the different scripts, you can use a Script Parameter, and do the If's based on that, using Get ( ScriptParameter ) to get it.
It is a little odd, because AppleScript can run a FileMaker by name (in fact it has to). So if you're only on Mac, that's an option; you can run it in FileMaker with the Perform AppleScript step.* But FileMaker internally cannot; hence the "yet", as it seems likely that some day it will be able to.
*Do not however expect this to still work if you change the script names; that is the tradeoff.
Thank you, I will have to just do it the old fashion way.
Let the active field you refer to be a button. Let the button have one script: Perform Script (ideally buttons would only have Perform Script attached, and no other script step ever). In Perform Script's parameter box just type in the name of your field. The script that Perform Script calls will then have a Set Variable script step within it with Get(ScriptParameter) as the value (you will find your Getters under Get, more so than All-Functions-by-Name -- this is in your calculation area, aka "Specify Calculation", called up within ScriptMaker when you're setting (specifying) the Value in the Set Variable script step). Then have a section in your script (the first one called, by the button) where the first line is IF [yourVar = "script1"] and the next line is Perform Script ["script1"] and the next, or last, line is EndIF
Post your script online for us when you're done, or hit a wall.