From Dwayne Wright PMP
Certified FileMaker Developer
A very powerful way to troubleshoot a large script is to break it down into multiple smaller subscripts, then have a main script that calls upon the smaller scripts using the Perform Script script step.
Doing this, you can debug and test each smaller script individually. When they all working trouble free, you can either use the subscript method you already have in place or (if you really like having that large single script) copy the script steps from the subscripts themselves into the larger script. Copying script steps is a feature of FileMaker Pro Advanced and is always recommended for any detailed FileMaker project you may be working on.
FYI... The Perform Script step is used to execute another script, often called a subscript. You can specify to run any of the scripts in the current database file or a script in another FileMaker file (including files on the network). It’s even possible to have a script call multiple other subscripts, that even have subscripts of their own.
The art of smaller script troubleshooting also works very well with the ability to put scripts into folders. Many times when I’m working on a large database from a client that has no script folder structure at all, I may put all their older scripts in one folder and my new scripts in another folder. Then I may create a third folder for scripts that I’ve tweaked for the clients particular needs.
More info about the author and FileMaker in general, contact me at firstname.lastname@example.org.
© 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.