CCBtx Posted November 2, 2009 Posted November 2, 2009 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
Vaughan Posted November 2, 2009 Posted November 2, 2009 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.
Fenton Posted November 2, 2009 Posted November 2, 2009 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;
CCBtx Posted November 2, 2009 Author Posted November 2, 2009 Thank you both. I think I will hard code right now... but I think Scriptmaster is the way to go. CCB
Recommended Posts
This topic is 5501 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 accountSign in
Already have an account? Sign in here.
Sign In Now