Database Reference
In-Depth Information
Figure 17-8. This script, along with a custom Payment layout, is in the finished sample file for this
chapter. Run from a “+” button on the Invoice layout, it lets users enter payment data through a
scripted process. First, the script shows a custom dialog box asking the user to confirm that she
wants to post a payment. If the user clicks the Post button, then the script creates and shows a mod-
al dialog window. Users can't do anything else until they click a button on the Payment layout.
NOTE
Dialog windows, combined with scripts, are so powerful that you can build a process like
FileMaker's Layout Assistant ( Creating a New Layout ), where you walk the user through a series of
“panels” where they'll enter data and make choices.
Showing Feedback with a Merge Variable
The script shown in Figure 17-8 needs to let users know that they can't post a payment on in-
voices that have already been paid. You saw the concept of showing the user a message on
their layout back on Timer Scripts when you learned about Install OnTimer scripts. Here a
similar script sets a message into a global variable that's been placed on the layout and
formatted in red so that the user will notice it. The message appears if the Invoices::Total
Due amount equals Invoices::allPayments. The message gives the user feedback about why
she's not seeing a payment window when she clicks the + button on the Invoice layout. See
the result in Figure 17-9 .
Search WWH ::




Custom Search