Reference > Script steps reference > Found Sets script steps > Constrain Found Set
 
Constrain Found Set
Purpose 
Narrows the existing found set using the current or stored find requests.
See also 
Format 
Constrain Found Set [Restore]
Options 
The Specify Find Requests dialog box allows you to create and store a find request with the script step.
Compatibility 
 
Where the script step runs 
Supported 
FileMaker Pro 
Yes 
FileMaker Server 
Yes 
FileMaker Go 
Yes 
Custom Web Publishing 
Yes 
FileMaker WebDirect 
Yes 
Runtime solution 
Yes 
Originated in 
FileMaker Pro 6.0 or earlier
Description 
This script step is equivalent to a logical AND search. Otherwise, Constrain Found Set is similar to the Perform Find script step.
Note  If no records match the find criteria, this script step returns a found set of zero records.
Example 1 
Constrains the found set to paid invoices or shows all records.
Show Custom Dialog ["Display only paid invoices?"]
If [Get ( LastMessageChoice ) = 1]
Enter Find Mode [Pause: Off]
Set Field [Invoices::Status; "Paid"]
Constrain Found Set [ ]
Else
Show All Records
End If
Related topics 
Script steps reference (alphabetical list)
Script steps reference (category list)