Idiot Proofing
Polishing up the Solution
There is one more addition that really makes this solution user-friendly.
When the user performs a search and locates multiple records, that aren't really
aware of the fact unless they are familiar with FileMaker. Your best solution is
to show the user a columnar report layout when multiple records are found and a
standard layout when a single record is found. This can be done with a simple IF
statement that checks for the current found count.

Advanced Exercise
As you have probably noticed, the final script repeats the Toggle Status Area and Toggle Window scripts steps over and over. How can you use Modular Scripting to shorten the script? Modular Scripting is a method of programming FileMaker the reuses code whenever possible.
The answer is to break-out the Toggle Status Area and Toggle Window script steps into a separate script. Each time the Find script needs to toggle the window size, just call on the script. This makes the main find script a lot easier to read since there are less script steps. And, if you need to add something onto the Toggle Window script, you just need to modify it once rather than locating everywhere in your other scripts where they might toggle the window.

Toggle Window script n FIND.fp5
Notice that the Toggle Status Area script uses the Toggle option rather than Show or Hide. This enables you to use one script to show and hide the status area, rather than one modular script for showing and another for hiding.
Download an example FileMaker file
.
Previous | DONE
|