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
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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
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.
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.
In Query SAve event:
Dim curdoc as notesdocument
Set curdoc=Source.document
If curdoc.YourfieldName(0)=""
msgbox "Pls enter value...."
call Source.gotofield(YourField
continue=false
End if
Alternatively, You can have a funtion to validate and pass the field names in a loop and validate the fields.