ISO FileMaker Magazine: FileMaker Video Tutorials, Templates, Help & More

Navigation

Video Browser

Scriptology Video Browser

Tools & Resources

Calculations

FMP V8.5 Validation and its Revert Dialogues

Posted by: MaxR / Wednesday, May 16, 2007 – 6:09pm

Native FMP validation provides a quite extensive range of quite useful options. However, its method for managing invalid conditions is quite poor.

You have the option to specify a custom message but after that you have little choice as to how invalid conditions are managed.

Filemaker shows your custom message (or its message) and offers a dialogue popup with OK and Revert buttons. Regardless whether the user selects OK or Revert, another dialogue popup is displayed with Revert and Cancel.

For example, in an items portal of an Order, I'm validating that the Received Qty cannot exceed the Ordered Qty using:
- Validate by Calculation with
- Only during Data Entry and
- Display Custom Message if Validation Fails.
When the user enters a Received Qty greater than the Ordered Qty AND clicks in a blank area of the screen, the Custom message displays with two buttons: Revert and OK.

The problem with this is that the user could have previously entered several Received Qty's in several line items. Then when Revert is used, all data entry including the wrong entry is lost. Having to start over from scratch on a long list of items for just one typo would be most annoying. The user can click OK and fix the last typo. But you cannot prevent the Revert button from showing.

The second problem is that when Revert is used to the first dialogue,another dialogue box opens saying "Revert all changes to this record since it was last entered" with two buttons Revert and Cancel. At this point, the user has no idea what "Record" it's talking about.

So how does one handle the problems:

1. To avoid having to click in a blank area of the screen in oder to check for any validation messages. This breaks the natural data entry sequence. Ideally, one just needs to be warned immediately on release of the entry into the field without having to click on a blank area of the screen.

2. To the Custom Message display, show only the OK button.

3. To avoid having a second Revert dialogue appear.

A simple solution is to replace the FMP Validation by Calculation with Auto-Enter by Calculation on the entry field so that if it's invalid, you can change its color to red.
e.g.

If (Qty_Received > Qty_Balance ; // the validation test
TextColor ( Qty_Received ;RGB ( 251 ; 51 ; 51 ) ) ; // the error response
Qty_Received ) // the valid response

This gets rid of the Revert dialogues, having to click on a blank piece of the screen and (unfortunately) the audible beep.

Many people opt to avoid FMP validation altogether and instead use either ZippScript or EventScript plugins.

I've studied other quite sophisticated solutions using a combination of Plugins and Custom Functions combined with Audit Logging but which still (unfortunately) allow for the possibility of Filemaker Validation cropping up.

No matter how extensively we go about validating data that users supply is valid, there's always a situation where a user can inadvertently or consciously, sabotage the data. A visual highlight is normally sufficient.

------
Max Rogalsky
Melbourne, Australia
www.maxiwyse.com.au

Syndicate content