Restoring a Find
Creating a script that performs a find for the same find criteria everytime you run it only requires a single script step. Here are the steps:
1. Perform the find manually
2. Create a script containing the Perform Find script step
3. The option for Restore should already be checked
4. Click the OK button to accept the script
Restore Find script in RESTORE.fp5
When you click the OK button to accept this script, FileMaker looks at find mode for the last find that was performed. It captures the find criteria used and stores it in the script. Everytime you run the script, a find using the same find criteria will be performed. Since the script remembers the find criteria rather than the records found, newly added records will be found if they meet the find criteria stored in the script.
From the example provided in the RESTORE.fp5 file, the Restore Find script locates any record greater than 1/1/98. However, this information is not displayed anywhere in the script.
TIP: It is recommended that you add a Comment step at the very beginning of your script detailing what type of find criteria is being restored. If you forget to add the Comment script step, you can determine what find criteria is used in the restored find by running the script and choosing Modify Last Find from the Select menu. Make sure you are viewing a layout that contains all your fields or you may miss a field that contains find criteria.
Exercise: Create a script that locates all records that contains a name that starts with "J" in the Text Entry field.
Next
|