[Forums] [Shop] [Resources] [Training] [About] [Solutions] [Consulting] [News] [Links]

Questions s I hope you enjoy this FREE online training. Let me know if you'd like to see more! You can email me at jmo@filemakerpros.com. And, if you really like this online training, consider one of my live classes based on my wildly popular book and CD ROM. Happy FileMaking!

Idiot Proofing

No Records Found

A common occurence when performing a find is the No Records Found error message. It can be very confusing for users who have not worked with FileMaker before.

Standard error message in FileMaker when no records are found

What should the user do? Continue the script? Modify the Find? Continuing the script will take the user back to the layout where they started, but leave them with no records found. This can be very confusing. If they click Modify Find, they will stay in find mode and be allowed to enter different find criteria. However, they may not realize what went wrong. That is why the following error message is far superior.

Error message in Find w/ test for No Records Found in FIND.fp5

Here is the script in the FIND.fp5 file that adds the proper script step to make this happen.

Find w/ test for No Records Found script n FIND.fp5

The script steps that were added were: Set Error Capture, If, Find All, Show Message and End If. Turning on error capture suppresses all standard FileMaker error messages. However, this gives you a big responsibility. You need to trap for possible errors and display a friendlier error message. This is done using the If statement and checking to see if error number 401 has occured.

NOTE: Make sure the test for the error immediately follows the script step that could cause the error to occur. The Status(CurrentError) function holds the error in memory temporarily.

Notice that the If statement also performs a Find All. This prevents the user from returning to a found set of zero records.

Previous | Next


Exclamation s Database Pros offers training classes across the globe. Classes include the wildly popular Intermediate and Advanced Scriptology training series.


Database Pros