From Dwayne Wright - www.dwaynewright.comOn the most fundamental level, this step goes into find mode, enters in find criteria (new user entered criteria or restored find criteria) and performs the find. This step can be used in conjunction with the Enter Find Mode script step or independently. When it is used with the Enter Find Mode step, it executes the find parameters after the Enter Find Mode Pause. On it's own, it can be used to perform an entire saved FIND command.
The one option for this script step is to specify the find parameters. Here you can manually select the find settings you want to perform. Many users know about how the recent find is automatically shown here when you add a new script. If not, let me tell you that you can perform a find you want to say manually. Add the Perform Find script step to the script you want to have it, click the specify find request button and the setting for the find you just did will automatically be there. You can save the setting as is or tweak it as necessary.

HOW PERFORM FIND IS USED
Usually the script will look something like...
Go to the layout that has the key fields you want to search with
Enter Find Mode
Place Find Specifics in the Key Fields
Perform Find
Optionally (some would argue this is not an option) the scripter may have the script do some error trapping for the possibility of no records found .
An example of how this type of script would look like would be ...
Set Error Capture On
Go to Layout (that has the key searching fields)
Enter Find Mode
Paste in the Find Specifics in the Key Fields
Perform Find
If(StatusCurrentError = 401)
Show Message "No matching records found!"
Perform an error reaction subscript
Else
Go To Layout (the one you want to display)
While we are here, lets elaborate about ScriptMakers Error Capture.
FileMaker, like almost any application, will give you an error message when an error occurs. Usually, this is a good thing and you can then go on about your business. Sometimes though, you would rather have the database react in a customized manner when a common error occurs. Usually the Set Error Capture step is used in conjunction with an IF Statement. If a particular error comes up, immediately perform a desired task. There are a number of reasons you want to do this but they usually fall into the two main categories of the user experience and automating processes.
The user experience misfire is when you don't want to confuse a typical user with an error message they probably won't understand. The set error capture and braching If script steps allow the developer the opportunity to present the user with an alternative error message and perhaps branch the script in a designed direction.
The FileMaker error message of "No Records Found" can toss a lot of beginning FileMaker users for a loop. If you trap for this error, you can control what the user can do after a search comes up fruitless. Generally, a developer should try to put the Set Error Capture script step as close as possible to the top of the script. However, it is possible to have Set Error Capture On and Set Error Capture Off sprinkled through out a complicated script in order to selectively add error capture throughout the script.
=
More info about the author and FileMaker in general, contact me at info@dwaynewright.com.
© 2007 - Dwayne Wright - dwaynewright.com
The material on this document is offered AS IS. There is NO REPRESENTATION OR WARRANTY, expressed or implied, nor does any other contributor to this document. WARRANTIES OF MERCHANT ABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY DISCLAIMED. Consequential and incidental damages are expressly excluded. FileMaker Pro is the registered trademark of FileMaker Inc.

0 comments:
Post a Comment