.
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: DialogBox method
1. This script displays a document in a dialog box using the policy form whenever a user clicks the button. The first layout region on the policy form is sized to fit into the dialog box.
Sub Click(Source As Button)
Dim workspace As New NotesUIWorkspace
Call workspace.DialogBox _
( "policy", True, True, True, True, _
False, False, "Policy" )
End Sub
2. This script displays the current document using a form called DirectReports. Both the current document and the DirectReports form display a number field called HeadCount. In the dialog box, the user may edit the HeadCount, which means that the field value for HeadCount changes on the current document. The script compares the HeadCount field before and after the call to DialogBox and updates the TotalHeadCount field with any changes. For example, if HeadCount increases by 5, the script increases TotalHeadCount by 5.
Sub Click(Source As Button)
Dim workspace As New NotesUIWorkspace
Dim uidoc As NotesUIDocument
Dim oldHeadCount, newHeadCount, _
totalHeadCount As Integer
Set uidoc = workspace.CurrentDocument
oldHeadCount = Cint( uidoc.FieldGetText( "HeadCount" ) )
totalHeadCount = Cint _
( uidoc.FieldGetText( "TotalHeadCount" ) )
Call workspace.DialogBox( "DirectReports", True, True )
' HeadCount may have changed, so get new value
newHeadCount = Cint( uidoc.FieldGetText( "HeadCount" ) )
If ( oldHeadCount <> newHeadCount ) Then
' HeadCount has changed,
' so change TotalHeadCount accordingly
Call uidoc.FieldSetText( "TotalHeadCount", _
Cstr( totalHeadCount + _
( newHeadCount - oldHeadCount ) ) )
End If
End Sub
3. This script brings up a dialog box with the category and subject of the first document in the "By Category" view.
Sub Click(Source As Button)
Dim db As NotesDatabase
Dim s As New NotesSession
Dim workspace As New NotesUIWorkspace
Dim view As NotesView
Dim doc As NotesDocument
Set db = s.CurrentDatabase
Set view = db.GetView( "By Category" )
Set doc = view.GetFirstDocument
Call workspace.DialogBox _
("Dialog Box", True, True, False, False, False, _
False, "Dialog Box", doc)
Call doc.save (True, False)
End Sub
See Also
DialogBox method
Feedback on
Help
or
Product Usability
?
Help on Help
All Help Contents
Feedback on
Help
or
Usability
?
Help on Help
All Help Contents