Building scripted finds and compound requests
ExpertUse Enter Find Mode, Set Field, and Perform Find to script searches with multiple criteria, omit requests, and saved finds.
What you'll learn
- How to build a multi-request compound find from a script
- How to omit records using a second find request
- How to handle a "no records found" result without an error dialog
Scripted finds give you full programmatic control over FileMaker's find mechanism. You can build compound requests (multiple criteria rows), omit records from results, and pass search values from script parameters — all without opening the Find Mode UI to the user.
1/3
1
A basic scripted find
Enter Find Mode, set the criteria fields, then Perform Find. Wrap in error handling to catch error 401 (no records found).
FileMaker Script
Set Error Capture [ On ] Enter Find Mode [ Pause: Off ] Set Field [ Contacts::Status ; "Active" ] Set Field [ Contacts::Region ; "West" ] Perform Find [ ] If [ Get ( LastError ) = 401 ] Show Custom Dialog [ "No active contacts in the West region." ] Go to Layout [ "Contacts" ] End If
Sign in to track your progress and pick up where you left off.
Sign in to FM Dojo