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

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

Recommended Posts

Posted

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

Posted

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.

Posted

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;

Posted

Thank you both.

I think I will hard code right now... but I think Scriptmaster is the way to go.

CCB

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 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.