.
HCLSoftware Business Partner
Domino Consulting Services
CRUCIAL Notes Tools
+1
212-599-2048
Domino Consulting Services
CRUCIAL Notes Tools
Domino administration
Notes development
Chat now
.
EN - English
CN - 中文
JP - 日本語
DE - Deutsch
FR - Français
BR - Português
RU - Pу́сский
IT - Italiano
IN - हिन्दी
ES - Español
KR - 한국어
ID - Indonesia
NL - Dutch
TR - Türkçe
SA - العربية
SE - Svenska
NO - Norsk
PL - Polski
TH - ไทย
DK - Dansk
MY - Malay
PH - Filipino
GR - Ελληνικά
FI - Suomi
IL - עברית
IE - Gaeilge
CZ - Čeština
UA - Українська
RO - Română
VN - Tiếng Việt
BD - বাংলা
HU - Magyar
Need a Domino Consultant? Call NotesMail +1 212-599-2048
-
HCLSoftware Business Partner
LOTUSSCRIPT/COM/OLE CLASSES
Examples: OnSubmit event
1. This OnSubmit event discontinues the save operation and moves the insertion point to the Title field if the Title field is empty.
Sub Onsubmit(Source As Notesuidocument, _
Continue As Variant)
If Source.FieldGetText("Title") = "" Then
Messagebox "You must enter a title",, "No title"
Call Source.GotoField("Title")
Continue = False
End If
End Sub
2. This OnSubmit event updates the ProjectStatus field depending on the difference between the current date and the date in the DueDate field.
Sub Onsubmit(Source As Notesuidocument, _
Continue As Variant)
Dim todayDT As NotesDateTime
Dim dueDT As NotesDateTime
Dim daysLeft As Long
Dim status As String
Call Source.Refresh
Set todayDT = New NotesDateTime("Today")
Set dueDT = New NotesDateTime _
(Source.FieldGetText("DueDate"))
daysLeft = dueDT.TimeDifference(todayDT) / 86400
Select Case daysLeft
Case 1, 2, 3
status = "Urgent"
Case 4, 5, 6
status = "Hurry up"
Case Else
status = "No worries"
End Select
Call Source.FieldSetText("ProjectStatus", status)
End Sub
Feedback on
Help
or
Product Usability
?
Help on Help
All Help Contents
Feedback on
Help
or
Usability
?
Help on Help
All Help Contents