Sometimes a script needs to tell your users something—“There are no records to include in this report”—or ask the user a question—“How many copies of the report do you want?” To this end, the Show Custom Dialog script step can display a dialog box that you control. Calling it a “Custom” dialog box may be a bit too generous (you don’t have much say in how it looks), but you do get to give information to people using your database, and ask them simple questions.
When you add the Show Custom Dialog step to your script and click its Specify button, you see the window shown in Figure 15-2.
The Show Custom Dialog script step has three basic purposes. First, it can display a simple message. In a script that finds all overdue invoices, for example, you can have a message that says, “No invoices are overdue” if FileMaker finds nothing.
Figure 15-2. The Show Custom Dialog Options window has two tabs. Here you see what’s under the General tab: Title, Message, and the buttons. In its most basic form, a custom dialog box shows a message with just one, two, or three buttons. Figure 15-3 shows how each of these settings affects the dialog box the user sees.
Second, you can create a dialog box that asks a simple question. Say you have a script that posts a customer payment. Before launching into the process, your custom dialog box can ask, “Are you sure you want to post a ...