Reference > Script steps reference > Found Sets script steps > Perform Find
 

Perform Find

Finds records using the current or stored find requests.

See also 

Options 

Specify find requests allows you to create and manage find requests. The requests you create are stored with the script step (Restore indicates a stored find request). For more information, see Specify Find Requests and Edit Find Request dialog boxes.

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.

The Edit Find Request dialog box allows you to create or edit find request criteria.

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.

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.

Type your search criteria for the selected field in the Criteria area.

Click Insert Operator to further refine your search criteria. See Finding records.

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 field and/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.

Compatibility 

 

Product 

Supported 

FileMaker Pro Advanced 

Yes 

FileMaker Go 

Yes 

FileMaker WebDirect 

Yes 

FileMaker Server 

Yes 

FileMaker Cloud products 

Yes 

FileMaker Data API 

Yes 

Custom Web Publishing 

Yes 

Runtime solution 

Yes 

Originated in 

FileMaker Pro 6.0 or earlier

Description 

You can use Perform Find with or without specifying a find request in the script step:

If you specify one or more find requests, this script step enters Find mode, performs the specified find requests, then enters Browse mode.

If you don't specify a find request:

In Find mode, this script step performs the current find requests, then enters Browse mode.

In any other mode, this script step enters Find mode, performs the last find request that was executed, then enters Browse mode.

You can use Perform Find following an Enter Find Mode script step, either pausing the script to allow the user to enter find criteria or using the Set Field script step to specify find criteria before performing a find.

Example 1 

Goes to the Invoice Details layout, enters Find mode, pauses for user input, performs a find, and returns to the original layout.

Go to Layout ["Invoice Details"]
Enter Find Mode [Pause: On]
Perform Find [ ]
Go to Layout [original layout]

Example 2 

Goes to Find mode, sets the Date field to the current date, and performs the find. Displays the Invoice Details layout, Invoices layout, or a custom dialog box depending on how many records were found with today's date.

Set Error Capture [On]
Enter Find Mode [Pause: Off]
Set Field [Invoices::Date; Get(CurrentDate)]
Perform Find [ ]
If [Get ( FoundCount ) = 1]
Go to Layout ["Invoice Details"]
Else If [Get ( FoundCount ) > 1]
Go to Layout ["Invoices"]
Else
Show Custom Dialog ["No records were found."]
End If

Related topics 

Constrain Found Set script step

Extend Found Set script step

Omit Record script step

Finding ranges of information

Script steps reference (alphabetical list)

Script steps reference (category list)