Find Matching Records
Purpose 
Finds records based on the context of a specified field.
Format 
Find Matching Records[Replace/Constrain/Extend; <table::field>]
Options 
Select Specify target field or click Specify, select a field or specify a calculation indicating the field you want to search by, and click OK.
Notes
You can:
 •
 •
clear Specify target field to remove current target field settings
To specify the type of find request, for Specify, choose:
 •
Replace to search the entire database and replace the current found set with records that match the contents of the active field.
 •
Constrain to search the found set and display matching records based on the contents of the active field (a logical AND search).
 •
Extend to broaden your search to include additional records in the found set that match additional criteria in the specified field (a logical OR search).
Compatibility 
 
Where the script step runs 
Supported 
FileMaker Pro 
Yes 
FileMaker Server scheduled script 
Yes 
FileMaker Go 
Yes 
Custom Web Publishing 
Yes 
Instant Web Publishing 
Yes 
Runtime solution 
Yes 
Originated in 
FileMaker Pro 12.0
Description 
Finds records based on the context of a specified field, letting you create scripts that behave similarly to using the shortcut menu in Table View.
If you do not specify a field, FileMaker Pro searches based on the contents of the field that is active when the script runs. If data is selected in the active field, FileMaker Pro searches for the selected data. If data is not selected, FileMaker Pro searches for the entire contents of the active field. If you do not specify a field and there is no active field when the script runs, FileMaker Pro displays an invalid command alert.
Find Matching Records runs in Browse or Preview modes. If the database is in another mode when the script runs, FileMaker Pro switches to Browse mode before running the script.
Find Matching Records can be copied and pasted or imported into other FileMaker Pro files.
Examples 
The following script finds all records in the database that contain data values that match data in the active Order Date field. For example, this script might return all records showing orders placed on 10/10/2013.
Find Matching Records [Replace; Products::Order Date]
The following script reduces the current found set to include only records that contain product name data values that match the value in the active field. In this example, if the active field contains the text string “coats,” this script reduces the found set from the example above to include only orders for coats that were placed on 10/10/2013.
Find Matching Records [Constrain; Products::Product Name]
The following script adds to the current found set all records in the database that contain data values that match data in the active Product Name field. In this example, if the active field contains the text string “shoes,” this script expands the found set to include orders for coats and shoes placed on 10/10/2013.
Find Matching Records [Extend; Products::Product Name]
Related topics 
Script steps reference (alphabetical list)
Script steps reference (category list)