Link to home
Start Free TrialLog in
Avatar of Monterey
Monterey

asked on

I have several fields on a form I want to make required...

I posted the same question several months ago.. see: 09/21/09 02:21 PM, ID: 24749909

The solution worked fine for some reason in that database, which use the old approval database template.  Now I tried it on a field, in a doc library, I put:
@If ( @IsDocBeingSaved & @ThisValue = "";
@Failure(@ThisName + " is blank.");@Success)

on the Input Validation tab. !st it works, and I get the error message, then I get "Notes Error- field didn't pass validation formula" Then it asks if I want to Save, Cancel or Exit. I just want it to go back to the form so the user can enter the data that is missing.
error1.jpg
ASKER CERTIFIED SOLUTION
Avatar of Sjef Bosman
Sjef Bosman
Flag of France image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
If you want to use Lotus Script for Field validation in Query Save event.

In Query SAve event:

Dim curdoc as notesdocument
Set curdoc=Source.document

If curdoc.YourfieldName(0)="" then
msgbox "Pls enter value...."
call Source.gotofield(YourFieldname)
 continue=false
End if

Alternatively, You can have a funtion to validate and pass the field names in a loop and validate the fields.
The joys of validation. How are you triggering the validation? Obviously it's at the point of saving, but how are you invoking the save?

Try a save button with just @command([FileSave]) and see if you get the same thing. I wonder if you have a save button which after saving tries to then close the window, and it is the closing that triggers the following save/cancel prompt.