Manage Learn to apply best practices and optimize your operations.

Too Many Mandatory Fields?

Ever have a form with loads of mandatory fields that must be completed by the
user before they can submit the form? Try this as a quick way to check the
value of the fields in question, and put the user in each incomplete field.
Sub Click(Source As Button)

Dim sess As New notessession
Dim ws As New notesuiworkspace
Dim uidoc As notesuidocument
Dim db As NotesDatabase
Dim form As notesform

Set db = sess.CurrentDatabase
Set form = db.GetForm("Main")
Set uidoc = ws.currentdocument

Dim value As String

Forall field In form.Fields

If Right(field,1) = "M" Then ' the M is to mark your mandatory fields
value = uidoc.fieldgettext(field)
If Value = "" Then
Messagebox "You must complete all fields marked with a
Call uidoc.gotofield(field)
Exit Sub
End If
End If

End Forall

Call uidoc.close

End Sub

Dig Deeper on Domino Resources

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.




  • iSeries tutorials's tutorials provide in-depth information on the iSeries. Our iSeries tutorials address areas you need to know about...

  • V6R1 upgrade planning checklist

    When upgrading to V6R1, make sure your software will be supported, your programs will function and the correct PTFs have been ...

  • Connecting multiple iSeries systems through DDM

    Working with databases over multiple iSeries systems can be simple when remotely connecting logical partitions with distributed ...