I have form with fields that I want to make mandatory (required), so I want to prevent users to save document until they enter values in all files that is mandatory (fields are text and number type).I believe that I could define every filed as computed and put some LS, something like
@If(@IsDocBeingSaved & FieldName = “”;@Failure(“FieldName is a required field”);@Success)
Sub Querysave(Source As Notesuidocument, Continue As Variant)
Dim checkField (1 To 6) As String
' List of fields to validate
checkField(1) = "Color"
checkField(2) = "Size"
checkField(3) = "Pattern"
checkField(4) = "Style"
checkField(5) = ""
checkField(6) = ""
Forall f In checkField
If f = "" Then Goto skipfield
If Source.FieldGetText(f) = "" Then
Msgbox "Field " & f & " cannot be blank", 48, "Validation error ..."
Call source.GotoField(f)