Solved

Lotus Notes

Posted on 2000-04-11
5
1,003 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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This is an old article, please see an updated version of this article, located here: http://www.experts-exchange.com/articles/23619/Notes-8-5x-Windows-7-Notes-info-and-tips.html
IBM Notes offer Encryption feature using which the user can secure its NSF emails or entire database easily. In this section we will discuss about the process to Encrypt Incoming and Outgoing Mails in depth.
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.

776 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