Database Reference
In-Depth Information
formed. If you skipped the dry run, then set the dialog box to sort by Date Due, in as-
cending order.
14. In the Sort Records window, click OK .
Unlike some other script steps, Sort Records doesn't show its settings. It just says
Restore to indicate that you've set up sort criteria. To check the settings, click the
Specify dialog box to view the Sort Records dialog box again.
15. Click the Edit Script window's Close button and then click Save .
The Edit Script window has no Save button, but when you close it, you always see a
warning dialog box that lets you save your scripts.
TIP
In Windows 7, the Edit Script window has a File menu, from which you can choose Save
Script. On a Mac, use the shortcut -S. If you're writing a long or hairy script, save often
because it's not uncommon to be in this window for a long time as you're working out the
script's logic.
The script is now complete. But as with any new feature, you need to test your script
to make sure it works as you intend. You'll learn more about the various ways to run
scripts on Running Scripts . But the most common way to run a script for testing is
with the Manage Script window's Perform button ( Figure 11-3 ).
16. Click the Perform button .
It's the one with a green triangle at the bottom right. FileMaker runs your script. If the
Perform button isn't highlighted, make sure that your script is selected. Even though
you have only one script written, FileMaker doesn't assume it knows which one you
want to perform.
NOTE
If you did the trial run before you wrote the script, you may not see anything happen on screen.
That's because your script repeats what you did. To be sure the script works properly, show all your
invoices and unsort them. Then switch to another layout and perform the script again.
You should see the correct list of invoices, or—oops!—a message telling you no records
were found, if you don't have any unpaid invoices in your database right now (see the box
below). In the next section, you'll refine your script to help deal with these message boxes if
they pop up when someone runs the script.
Search WWH ::




Custom Search