The Set Next Step button (Section 19.2) lets you skip script steps manually, but it's not much help unless you remember to click it at the right time. Instead, FileMaker Advanced lets you specify which steps you want to disable whenever the script runs. For example, looping scripts can take a long time to run in large databases, so temporarily disable your Loop and End Loop steps while you're checking other parts of the script. After one loop, the script continues on its merry way so you can continue debugging. (See the box on Section 18.104.22.168 for another cool way to get out of a loop.) You should also disable script steps that may do something destructive to your datarelying on Set Next Step and your mouse button is leaving an awful lot to chance.
To disable a script step (see Figure 19-5), open the script in ScriptMaker, then highlight the step you want to disable. Click the Disable button in the Edit Script dialog box. FileMaker puts two slashes in front of disabled script steps so you can identify them. To enable a step again, select it. The Disable button changes to Enable; click it and the step is back in business.
Disabling script steps is useful for debugging, but it can have long-term use, too. Any step that you disable in FileMaker Advanced gets skipped whenever someone runs iteven in FileMaker Pro. So say your company has a semi-regular promotion, that creates discounts for a limited period.
You don't have to write two different scripts, one with the discount and one without, and then worry about some kind of test to make them available on a button or in the script menu at the proper times. Write one script, making sure the discount creation steps are separate from the main process. Then you can enable the pertinent steps when the promotion starts and disable them when it's over, with very little fuss or muss.
Part I: Introduction to FileMaker Pro
Your First Database
Organizing and Editing Records
Building a New Database
Part II: Layout Basics
Advanced Layouts and Reports
Part III: Multiple Tables and Relationships
Multiple Tables and Relationships
Advanced Relationship Techniques
Part IV: Calculations
Introduction to Calculations
Calculations and Data Types
Part V: Scripting
Part VI: Security and Integration
Exporting and Importing
Sharing Your Database
Part VII: Appendixes
Appendix A. Getting Help