Specify Find Requests and Edit Find Request dialog boxes
Use these dialog boxes to create and manage
find requests that appear in the following script steps and when you create a saved find:
•Enter Find Mode
•Perform Find
•Extend Found Set
•Constrain Found Set
For more information on saving a find request, see
Saving a find request.
In the Specify Find Requests dialog box:
•New opens the Edit Find Request dialog box, where you define criteria for a find request.
•Edit opens a selected find request from the list.
•Duplicate duplicates one or more selected find requests from the list.
•Delete deletes one or more selected find requests from the list.
In the Edit Find Request dialog box:
1. For Action, select Find Records or Omit Records to specify whether this find request will find or omit records.
Finding records adds them to your
found set. Omitting records excludes them. An individual request can find
or omit records; use multiple requests if you need to find
and omit records during the same Perform Find script step.
2. Find records when (or
Omit records when) shows a list of the fields in your current
table. To construct a find request, begin by selecting a field from this list.
•To select a field from a
related table, click the name of the current table at the top of the list and select the related table you want. Select a
related field from this new list.
•Change the value in
Repetition to specify a particular cell of a
repeating field.
•Click
Insert Operator to further refine your search criteria. See
Finding records.
•You can include
local variables (beginning with $) and
global variables (beginning with $$) in find requests that you create or edit in the Edit Find Request dialog box. See “Notes for using variables in find requests,” below.
4. Click Add to add your criteria to the find request.
•To change existing criteria, select the line containing the field and criteria from the top of the dialog box, and make your changes to the field or criteria. Click Change to store your changes.
•To delete existing criteria, select the line containing the field and criteria from the top of the dialog box and click Remove.
5. Click OK.
Notes for using variables in find requests
•A variable in a find request can represent a simple expression (for example, */*/$birthYear) or a complex expression (for example, $birthQuery, where the value of $birthQuery is */*/1994).
•A variable in a find request cannot include the repetition (index) number of a repeating field (as in the syntax $variable[repetition]) or a file path.
•Variables in a find request can’t include additional variables. FileMaker Pro might not find matching records accurately if variables are nested.
•Because the value of a variable might be unknown during the validation of a field’s find request, validation stops when FileMaker Pro detects a variable. For example, when you enter find criteria for a date field in the Edit Find Request dialog box, FileMaker Pro stops validating the request when you enter the $ symbol (indicating a variable).
•If a find request contains a variable that FileMaker Pro doesn’t recognize, the variable is not evaluated, and no matching records are found.
•Use either a slash (/) or colon (:) as the terminator character in a variable used in a file path.
Example
The following table shows how criteria can be used to return certain records. Assume that six records have been entered into a text field called FirstName: Anne, Andrew, Lando5, Han, Han, Susan.
Action | Criteria | Record(s) Returned |
Find Records | Table::FirstName: [==”Andrew”] | Andrew |
Find Records | Table::FirstName: [*an] | Han, Han, Susan |
Find Records | Table::FirstName: [@an] | Han, Han |
Find Records | Table::FirstName: [!] | Han, Han |
Find Records | Table::FirstName: [@an*] | Lando5, Han, Han |
Find Records Omit Records | Table::FirstName: [*e*] Table::FirstName: [*w*] | Anne |
Find Records Omit Records | Table::FirstName: [*an*] Table::FirstName: [*#] | Anne, Andrew, Han, Han, Susan |
Related topics