Database Reference
In-Depth Information
Figure 17-2. All steps in a script are imported, but the references (tables, fields, relationships, and
layouts) in the steps are not. For example, a Set Field step that targets the Invoice::Date Due in
its original file will break when you import it into a file that doesn't have a field of that exact name.
Each broken step is recorded as an error in the Import Summary window that appears after your
import. Click the Open Log File button to get more information. For simple scripts, an import may
not save you much work. But since you get all the steps in their proper order, importing scripts is a
big help when the script is complex.
TIP
Reduce the number of errors in imported scripts by creating referenced elements in the target file be-
fore you import scripts.
Communicating with Database Users
Sometimes a script needs to tell people something as it runs. You may, for example, need to
let users know that there weren't any invoices with line items for three-quarter-inch lag bolts
for May 2014, or ask whether they want to print their report or create a PDF. Depending on
what you're trying to accomplish, you have several choices for exchanging information with
users. You can show a custom dialog box, use a merge variable to show a message on a lay-
out, or build a custom layout that guides users through a highly structured process.
Showing Custom Dialog Box
The Show Custom Dialog script step lets you write a message and display it in a dialog box.
Calling it a Custom dialog box may be a bit too generous—you don't have much say in how
it looks—but you can at least give information to people using your database and ask them
simple questions. The Show Custom Dialog script step has three basic uses. Custom dialog
boxes can do the following:
Search WWH ::




Custom Search