November 2, 200916 yr Is there a way (inside FileMaker rather than going out to a VB shell) to specify a variable script name. For example, I want to have a field in a table that says if Record 1, then run the name of the Script in Field "Script"... and so on for Record 2, run the Script in the Field "Script". I could build an elaborate VB script to do it... but is there a way inside FileMaker? Thanks, CCB
November 2, 200916 yr You could put the record number (or unique id or whatever) into the script parameter, and then get the script to process the parameter accordingly. The main script will have to have all of the other scripts hard-coded into it in a switching statement.
November 2, 200916 yr Normally we do as Vaughan says, use a script parameter, pass a script Variable, or (in the old days), use a global field, then use If, Else If statements to branch the script. But I can see where, if you have lots of scripts to choose from, it could be simpler to call a script by name. If you mean that the VB script is elaborate to set up (seems so to me, but then people say the same thing about AppleScript -), there is a free plug-in from 360Works, Scriptmaster, which can call a FileMaker script by name. The syntax is fairly simple. fmpro.performScript(tableName, scriptName); return true;
November 2, 200916 yr Author Thank you both. I think I will hard code right now... but I think Scriptmaster is the way to go. CCB
Create an account or sign in to comment