Database Reference
In-Depth Information
TIP
The Edit Find Requests dialog box is confusing until you get used to it. But there's a way you can
learn how it translates requests into its own particular syntax. Perform a find manually and then
write a test script with a Perform Find script step. FileMaker sets the dialog box with the criteria
for the search you just did.
To create a find request, from the “Find records when” list, select a field (if it's a repeating
field, then you can specify the repetition number in the Repetition box) and then, in the Cri-
teria box, enter text. The Insert Operator button gives you quick access to the same symbols
you see in the Status toolbar in Find mode, and the Criteria box accepts all the standard sym-
bols. Once you've finished entering the criteria, click Add to add it to the Criteria list.
▪ To edit an existing item in the criteria list, select it. When you do, FileMaker automatic-
ally selects the matching field in the Field list and puts the criterion in the Criteria box.
You can then make any changes necessary and then click Change.
▪ To remove a criterion from the list entirely, select it and then click Remove.
▪ Finally, you get to choose whether this request should be used to find matching records
or to omit them (see Finding by Omitting ). To turn this into an omitting find request,
from the Action pop-up menu, choose Omit Records.
▪ When you've finished adding criteria, click OK. Just like Find mode, you can add more
find requests if you want. In the Specify Find Requests window, just click the New but-
ton a second time. When you're all finished adding requests, click OK again.
Using a Variable to Create Dynamic Find Requests
As dependable as static finds are, you won't always be able to predict what someone wants
to find. Or the criteria for finding the same thing over and over can change, like when you're
searching in a date field. For example, suppose you want to find all the invoices created a
week ago. You can easily do that in Find mode: Enter a “≥” and then put the date from a
week ago in the Invoices::Date field. But what you put in that field changes every day . For
example, if today is November 7, and you create a script to find invoices for this week, then
you could attach this request to the Perform Find step:
Invoices::Date = "≥10/31/2014"
Unfortunately, as soon as November 8 rolls around, this script doesn't work anymore. It al-
ways finds invoices created since October 31, 2014. When you're faced with a situation like
this, you can adapt your static find request process slightly. To make it work, you'll use a
Search WWH ::




Custom Search