How FileMaker Scripts Are Called

From Dwayne Wright PMP, PMI-ACP, CSM
Certified FileMaker Developer

WEB: www.dwaynewright.com
EMAIL: info@dwaynewright.com
TWITTER: dwaynewright
YOUTUBE: FileMakerThoughts

There are a number of ways a script can be executed. Script are primarily executed by the downward click upon a button that the developer placed on a layout. This is just the tip of the iceberg of choices! I won’t cover then all in detail in this discussion but I do want to illustrate how versatile they can be access in your FileMaker solution.

FROM THE SCRIPTS MENU
By default, FileMaker has a scripts menu at the top of the screen. When you create scripts, you can click a checkbox to allow them to appear in this menu or to un-check them so that they do not.

FROM ANOTHER SCRIPT (called a subscript action)
One script can call upon other scripts. That allows you to create a more modular approach in your script design. You can update one script and every other script that calls upon it would be updated as well.

FROM A CUSTOM MENU
Created with FileMaker Advanced, a custom menu can be created to run a specific script.

FROM A SCRIPT TRIGGER (FileMaker 10 and higher)
FileMaker 10 can now run a script without the user clicking a button or choosing a menu command. This is accomplished via what is called a script trigger. Triggers can fire based upon record conditions, layout conditions, object conditions and more! This means that FileMaker 10 solutions have the potential to be way smarter than FileMaker 9 and earlier versions. In fact, I would venture to say that FileMaker 10 database can be designed to be much smarter than the users they service. This is a game changer folks, I guarantee!

FROM A PLUG-IN

FileMaker allows you to add third party resources called plug-ins that can activate scripts on schedules, when exiting a field and more.

FROM A ROBOT

This is a variation of the subscript action and/or the plug-in feature. There are some FileMaker databases that all they do is run scripts in other databases on a schedule. This can include data cleanup and even automatic reporting sent via email. More about this in later discussions, don’t want to rush into the big stuff too soon. (grin)

FROM THE MANAGE SCRIPT DIALOG BOX
If you are looking at your list of scripts in the script dialog box, you can click upon a script and click the Perform button in the lower button bar.

FROM AN EXTERNAL RESOURCE
This can include options like AppleScript, Shell Scripts, Flash or a host of other possibilities. I have to admit, this area is not something I’m experience with but I have seen others do it with remarkable results.

FROM A SERVER

A new feature in FileMaker 9 Server is the ability to run FileMaker scripts from a scheduled event. Additionally, FileMaker 10 Server now supports some scripted data import / export actions and the ability to generate emails on a scheduled basis from the Server containing FileMaker generated data.
=
More info about the author and FileMaker in general, contact me at info@dwaynewright.com.

© 2009 - Dwayne Wright - dwaynewright.com

The material on this document is offered AS IS. There is NO REPRESENTATION OR WARRANTY, expressed or implied, nor does any other contributor to this document. WARRANTIES OF MERCHANT ABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY DISCLAIMED. Consequential and incidental damages are expressly excluded. FileMaker Pro is the registered trademark of FileMaker Inc.