Modify Last Find

Changes the most recent find request.

Options 

None.

Compatibility 

Product Supported
FileMaker Pro Yes
FileMaker Go Yes
FileMaker WebDirect Yes
FileMaker Server Yes
FileMaker Cloud Yes
FileMaker Data API Yes
Custom Web Publishing Yes

Originated in version 

6.0 or earlier

Description 

Modify Last Find runs in Find mode. If the database is in another mode when the script runs, FileMaker Pro switches to Find mode before running the script.

Example 1 

Performs a find. If no records were found, modifies the find request.

Copy
Perform Find [Restore]
If [Get ( FoundCount ) = 0]
    Modify Last Find
End If

Example 2 

Performs a find, then sorts the found set. If no records were found, allows the user to modify the find request.

Copy
Set Error Capture [On]
Enter Find Mode [Pause: On]
Perform Find [ ]
If [Get (LastError) = 401]
    Modify Last Find
Else
    Sort Records [Restore; With dialog: Off]
End If