Database Reference
In-Depth Information
TIP
Since most reports follow these same steps, but with different options, you can adapt the basic struc-
ture of this script for a host of purposes. Use the Duplicate button to copy the script, give the new
script a descriptive name, specify a different layout and then change the find or sort criteria.
UP TO SPEED: TO BE CONTINUED
If your database has no unpaid invoices when you run the Find Unpaid Invoices script, then you see
a message indicating that no records were found. The message is the same as the one you see if you
perform the find manually, with one exception: This time you get a Continue button.
Since FileMaker was running a script when the error occurred, it gives you the choice to cancel the
script (in other words, stop in the middle and return control to the user) or continue the script (keep
going and pretend nothing went wrong). In this case, Cancel and Continue do the same thing since
the error happened on the last step in the script.
If you don't want the database user to make this choice, then you can tell FileMaker to capture the
errors as they happen and let you deal with them inside the script. You'll learn about this process on
The Set Error Capture Script Step .
Improving Your Script
On the preceding pages, you created a script that mimics what you'd do to get an unpaid in-
voice list, step by step. Often, a script can get the results you want with fewer steps than it
would take to do it yourself. For example, to see your unpaid invoice list, the steps boil down
to the following:
▪ Switch to the “Invoices with Balance Due” layout.
▪ Find the right invoices.
▪ Sort the records.
This version has just three steps instead of five because it assumes you can “find the right in-
voices” in one step. Luckily, the Perform Find script step really can find what you want in
one step. Here's how to revise your script to use the simpler form:
1. Choose Scripts Manage Scripts. In the Manage Scripts window, select the Find
Unpaid Invoices script and then click Edit .
Or you can double-click the script instead. In the Edit Script window, the Find Unpaid
Invoices script pops up.
Search WWH ::




Custom Search