I have an editable field and a button on a form. As an option, the button may be pressed to populate the field. The button is hidden if the editable field is not blank.
If I fill in the field and press tab, the button gets hidden as expected. If I then go back, blank the field and press tab, a validation error is generated as expected but the hide when for the button does not show the button as expected.
If I remove the validation formula the button hides and appears as expected.
Has anyone seen this behavior? I suppose there is nothing I can do aside from making the button appear all of the time or create a Lotus Script validation in QuerySave?
P.S. It does not seem to matter where I place the button, above or below the editable field, i still does not show as expected if there is a validation error.
Subject: RE: Failure in validation formula causes hide when formula not to recalculate
Perhaps you could put something in the QuerySave event on the form which calls ‘NotesUIDocument.RefreshHideFormulas’ and / or put your validation code in there and if it fails set ‘Continue’ to False to prevent the form saving.
Example:
If Trim(Source.FieldGetText(“MyField”)) = “” Then
Messagebox "MyField cannot be blank. Please check the value.", 0+16, "MyField"
Call Source.RefreshHideFormulas
Continue = False