.

HCLSoftware Business Partner
Domino Consulting Services
CRUCIAL Notes Tools
+1 212-599-2048

Domino Consulting Services
CRUCIAL Notes Tools
Domino administration
Notes development

Facebook Twitter YouTube
Chat now       
.
ProductsDownloadsNewsAbout usContact


Need a Domino Consultant? Call NotesMail +1 212-599-2048 - HCLSoftware Business Partner

LOTUSSCRIPT/COM/OLE CLASSES


Examples: ComputeWithForm method
This script creates a new document in the current database, sets its Form item to "Notification," and sets the value of the Topic item. The Notification form has the following input validation formula for the Subject field:

@If( Subject = ""; @Failure( "You must enter a Subject" ); @Success )

Because the script has not created a Subject item on the document, validation fails, ComputeWithForm returns False, and the document is not saved.

Dim session As New NotesSession
Dim db As NotesDatabase
Dim doc As NotesDocument
Dim success As Variant
Set db = session.CurrentDatabase
Set doc = New NotesDocument( db )
doc.Form = "Notification"
doc.Topic = "Large bodies of water"    
success = doc.ComputeWithForm( False, False )
If success Then
 Call doc.Save( True, True )
End If

See Also