Hi all .I have written a formula for Field validation and in the same form im Using some script where im Refreshing the Uidoc.If the Value entered in that Validating field is Wrong When ever the doc is refreshing Im getting two error messages.One is the error Message i Kept in the Validation FOrmula and Immediately after that Im getting the “NotesError-Field Did’t Pass field Validation Formula”
I cant write Script for Field Validation in Quarysave.
Please Kindly Help me in this regard.
A big tahks in advance
Subject: Please help me in Get rid of this error Messages
This error is occurring because save/refresh fails due to ur field validation. U need to trap this error by using error handler like “on error exit sub” kind of.

Subject: RE: Please help me in Get rid of this error Messages
Dear Singh ,Thanks for the responseAs im Writing the validation Formula in Field Validation Event.I cant write Script for the Field Validation.
Please let me Know if u have any Other Idea.
Thanks Alot
Subject: RE: Please help me in Get rid of this error Messages
From http://www-10.lotus.com/ldd/today.nsf/a2535b4ba6b4d13f85256c59006bd67d/a55740873b33ca2585256d4e005d2586?OpenDocument
Notes Error – field didn’t pass validation formula
This LotusScript error occurs when you call NotesUIDocument.Save, Send or Refresh, or NotesDocument.ComputeWithForm, and one of the fields on the form fails validation. Because that field also displays a validation error message, ordinarily you first see the message from an input validation formula’s @Failure clause (“You must enter a subject” for example) then the Notes Error… message. This most often happens in a form Querysave event or Action formula, when you call Refresh to make sure all the computed field values are up to date. To prevent your code from displaying a second error message, use On Error to intercept the error and take care of it silently. For instance, in a Querysave event, you may write the following:
Sub Querysave(Source As Notesuidocument, Continue As Variant)
On Error Goto validationFailure
Call Source.Refresh(False) ’ recalculate computed fields
On Error Goto ErrorTrap
’ …
Exit Sub
validationFailure:
Continue = False ’ don’t try to save because that’ll just get us the same error
Exit Sub
ErrorTrap:
’ display a more informative error message than the Notes default.
Messagebox "Error " & Err & " line " & Erl & ": " & Error
Continue = False
Exit Sub
End Sub
I should add, if you want to refresh and not get any message you can use @IsDocBeingRecalculated in your validation formula to always return @Success in that case.
Subject: Please help me in Get rid of this error Message
Yes that is annoying I found this by trial and error to do the trick… Instead of using @Failure to deliver your error new message, use @Prompt. You can still set your message and it will bypass that annoying second default error message.
For example in your “Input Validation” of your field, enter the following Formula (in this case testing for a null value):
@If(@ThisValue=“”;@Prompt([Ok]; “Field Empty” ; “Field cannot be empty, please enter a value.”);@Success)
Hope that helps, let me know if it does.
Cheers!