Disable Script Steps

The Set Next Step button in the Script Debugger lets you manually skip script steps while debugging, but it’s not much help unless you remember to click it at the right time. Sometimes you have a script step (or several) that you always want FileMaker to skip. You could just delete them, but maybe you’re not quite ready to. Perhaps it’s code that isn’t working yet and you intend to come back later to fix it. Or perhaps you’re moving the code somewhere else, and until you’re sure you’ve got it moved and working you don’t want to delete the original. Whatever the reason, you may want to temporarily disable a group of steps.

To disable a script step (see Figure 19-10), open the script in Script Maker, and 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, first select it. The Disable button changes to say Enable; click it and the step is back in business. As always, you can select multiple script steps at once, and disable or enable them all in one shot.

Disabling script steps is useful for debugging, but it can have long-term use, too. Any step you disable in FileMaker Pro Advanced gets skipped whenever someone runs it—even in FileMaker Pro. So, say your company has a semi-regular promotion that creates discounts for a limited period.

Figure 19-10. Two steps (the Perform Script steps) in this script have ...

Get FileMaker Pro 9: The Missing Manual now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.