.
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: AutoUpdate property
1. This QueryRecalc event sets AutoUpdate to False so the view is not repetitively updated during processing.
Sub Queryrecalc(Source As Notesuiview, Continue As Variant)
Dim view As NotesView
Dim doc As NotesDocument
Set view = Source.View
view.AutoUpdate = False
Set doc = view.GetFirstDocument
Do While Not doc Is Nothing
Call doc.ReplaceItemValue("Categories", _
doc.Categories(0) & "0")
Call doc.Save(True, False)
Set doc = view.GetNextDocument(doc)
Loop
End Sub
2. This agent creates a document after getting an uncategorized view. It sets AutoUpdate to False before navigating through the view, so the new document is not processed. This is indicated by the top level entry count, which remains the same before and after processing.
Sub Initialize
Dim session As New NotesSession
Dim db As NotesDatabase
Dim view As NotesView
Set db = session.CurrentDatabase
Set view = db.GetView("All")
Messagebox view.TopLevelEntryCount,, view.Name
Dim doc As New NotesDocument(db)
Call doc.ReplaceItemValue("Form", "Main Topic")
Call doc.ReplaceItemValue("Subject", "New document")
Call doc.Save(True, True)
view.AutoUpdate = False
Set doc = view.GetFirstDocument
While Not(doc Is Nothing)
Set doc = view.GetNextDocument(doc)
Wend
REM The entry count is the same
REM because the view is not automatically refreshed when
REM GetFirstDocument or GetNextDocument accesses the
REM new document
Messagebox view.TopLevelEntryCount,, view.Name
End Sub
3. This agent creates a document after getting an uncategorized view. It leaves AutoUpdate at the default False before navigating through the view, so the new document is processed. This is indicated by the top level entry count, which is incremented after processing.
Sub Initialize
Dim session As New NotesSession
Dim db As NotesDatabase
Dim view As NotesView
Set db = session.CurrentDatabase
Set view = db.GetView("All")
Messagebox view.TopLevelEntryCount,, view.Name
Dim doc As New NotesDocument(db)
Call doc.ReplaceItemValue("Form", "Main Topic")
Call doc.ReplaceItemValue("Subject", "New document")
Call doc.Save(True, True)
Set doc = view.GetFirstDocument
While Not(doc Is Nothing)
Set doc = view.GetNextDocument(doc)
Wend
REM The entry count is incremented reflecting the
REM new document
REM because the view is automatically refreshed when
REM GetFirstDocument or GetNextDocument accesses the
REM new document
Messagebox view.TopLevelEntryCount,, view.Name
End Sub
See Also
AutoUpdate property
Feedback on
Help
or
Product Usability
?
Help on Help
All Help Contents
Feedback on
Help
or
Usability
?
Help on Help
All Help Contents