Specify Find Requests and Edit Find Request dialog boxesUse these dialog boxes to create and manage find requests that appear in the following script steps and when you create a saved find:
• 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.
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.
•
3.
•
• 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.
• 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.
• 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.