Fred(CH)

Unable to revert Record because of Global Field Validation

Discussion created by Fred(CH) on Jul 5, 2017
Latest reply on Jul 12, 2017 by Fred(CH)

Product and version

FileMaker Pro 13->16.0.1 (and probably earlier)

OS and version

OS X 10.11 and Windows 10 (probably irrelevant)

Hardware

iMac 27'' Retina 5K late 2014

Description

Although it does not seem to be documented, if Validation Rules are defined for a Global Field, these validations are proceeded just before exiting the field and not just before the Record Commit. However, if an incorrect value was entered by a user whereas a Revert Record[No dialog] step is invoked by a script, this last step is failing with returning an error 1 (operation canceled by user).

How to replicate

Open the attached database

Push the "Test" button

Workaround

In your script, it is possible to test if the error 1 is occurring and if so, adding a Undo step before another Revert step. this will enter the prior value in the field (which *must* be correct) and then the Revert step will just do its job.

Attachments

Outcomes