None Found / Get(LastError)

From Dwayne Wright PMP - Certified FileMaker Developer
WEB: www.dwaynewright.com
EMAIL: info@dwaynewright.com
TWITTER: dwaynewright
YOUTUBE: FileMakerThoughts

Here we have a very simple example file. I have included two find buttons, however, neither one will find any records. The point of the example is to show how you can script a different experience for your users based upon what errors they may encounter.

The first button performs a regular find and then throws up a classic FileMaker dialog box. This dialog box contains the three choices of Cancel, Continue or Modify Find. If the current database user is someone unfamiliar with FileMaker, they may easily get confused by these choices.

What we would like to do is to simply inform the user that no records were found and go back to Browse mode with all records in the found set. We can do that with the second script tied to the button Find With Get(LastError) function Enhanced. This button runs a script that detects the 401 No Records Found Error. It tells the user this is what happened and simply goes back to browse mode.

Below is the sneak peek at the script.

An example file can be downloaded by clicking (here)
=
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.