Database Reference
In-Depth Information
Deciding which one to use depends on whether people know what they're looking for—or
how much work you want to save them. The upcoming sections go into this topic in detail.
You'll also see a find script in action and learn how to make a script pause and wait for in-
formation.
Pausing for Users' Find Requests
The Perform Find script step is like switching to Find mode and then clicking the Request-
s→Perform Find menu command. Perform Find 's single option lets you specify what find
requests to use, but, surprisingly, you can skip it entirely. If you don't turn this option on,
then Perform Find assumes you're already in Find mode with one or more requests, and
works just like the Requests→Perform Find menu command (and the Status toolbar's Find
button). It looks for records that match the already-defined find requests. All the matching
records become the new found set.
But where do those find requests come from? Either someone creates them or your script
does. For example, many developers like to add special “Find” layouts to their databases.
These layouts can show just the right fields, along with helpful text, to make things easier for
people. Figure 12-10 shows a Find layout for the Customers table.
To go along with this custom layout, you'll write a script that goes to the Find layout and
puts your user in Find mode. The script then pauses , giving her a chance to enter find re-
quests. When she's done, she clicks a button to resume the script, which performs the find
and then switches back to the Customers layout. To get started, choose Scripts→Manage
Scripts, click New, and name your script appropriately. Here's how to create the script you
need:
Search WWH ::




Custom Search