Database Reference
In-Depth Information
enterable in Find mode. The idea is that your users will type a word or phrase in this field
and then click a button to run the script.
Here's how to write the script. Call it Search Notes Field .
1. Add Go to Field as your first script step. Set it to go to the Customers::Notes
field .
Find/Replace requires a field to be selected before it can work, so you're taking no
chances with this script step. Script nerds call this being explicit . In this case, you're
being explicit about where the script should take its next action.
2. Add the Perform Find/Replace step to the script, and turn on the “Perform
without dialog” checkbox. Click the Specify button .
You see the “'Perform Find/Replace' Options” window.
3. Make sure the Perform pop-up menu is set to Find Next and then, to the right of
the “Find what” box, click the Specify button .
The Specify Calculation window appears.
4. Double-click the Globals::gSearch field to add it to your calculation. Click OK .
This calculation tells FileMaker where to look when it runs the Perform Find/Re-
place step—whatever the user has typed in the new field, in this case. Clicking OK
when you're done returns you to the “'Perform Find/Replace' Options” window.
5. In the Direction pop-up menu, choose All .
This option tells FileMaker to look through the entire Notes field.
6. Turn on the “Current record/request” and “Current field” radio buttons. Save
the script and close the Edit Script window .
You don't want the search to spill into different fields or records. Since the script goes
to the Notes field first, FileMaker searches only that field.
To finish the job, create a button next to the Global::gSearch field and then attach your script
to the button. Type into the search field and then click the Find button to test your new script.
The search word or phrase will be highlighted in the field. Click the Find button again
(without changing the search terms) to find other instances of the same search criteria.
Working with Records
You can get only so far with your scripts by working with field values. Eventually you need
to deal with more than one record . FileMaker has script steps for creating, duplicating, and
Search WWH ::




Custom Search