Solved

Lotus Notes

Posted on 2000-04-11
5
996 Views
Last Modified: 2013-12-18
I created a form in Lotus Notes, and I wanted to make one field "mandatory".  This field must be completed, cannot be blank. How do I set up this function?
0
Comment
Question by:keila
  • 2
  • 2
5 Comments
 
LVL 2

Expert Comment

by:mchampou
ID: 2703771
You have a few options. By far the easiest is to use the the "Input Validation" event of the field you need validated.

In there you could do the following

@If ( @Trim (FIELD_NAME) = "" ; @Failure ("Please enter a value in the field FIELD_DESCRIPTION") ; @Success)

Try it out ...
0
 

Author Comment

by:keila
ID: 2704679
Mchampou I tried the function you've described, but it is not exactly what I wanted.  
I want to block the users to go to the next field if they don't fill in the "mandatory" field I've determined.
The way you described the function, the field will have a message, but the users still can pass through to the next field.
I appreciate your help.
Thanks
0
 
LVL 1

Accepted Solution

by:
asselin earned 50 total points
ID: 2705079
Put this code in the Exiting event of all mandatory fields and replace the field name with yours:

Sub Exiting(Source As Field)
     
     Dim workspace As New NotesUIWorkspace
     Dim uidoc As NotesUIDocument
     Dim doc As NotesDocument
     
     Set uidoc = workspace.currentdocument
     Set doc = uidoc.document
     
     If doc.MandatoryField(0) = "" Then
          Msgbox "Mandatory field"
          Call uidoc.gotofield("MandatoryField")
     End If
     
End Sub
0
 
LVL 2

Expert Comment

by:mchampou
ID: 2705612
You might want to change the line

if doc.MandatoryField(0) = "" Then

to this ...

if trim(doc.MandatoryField(0)) = "" then

that way the user will really need to enter something in there (not just spaces like one of mine did ;-)

Have a good day,

Mchampou
0
 

Author Comment

by:keila
ID: 2711643
Thanks for helping me!
0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

For users on the Lotus Notes 8 Standard client, this article provides information on checking the Java Heap size and adjusting it to half of your system RAM in attempt to get the Lotus Notes 8.x Standard client to run faster.  I've had to exercise t…
This article covers general Notes 8.5 troubleshooting information including recreating the Notes\Data folder.
This video discusses moving either the default database or any database to a new volume.
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now