LOTUSSCRIPT/COM/OLE CLASSES


Example: Accessing view entry properties
1. This example will display several NotesViewEntry properties.

Sub Initialize
 Dim session As New NotesSession
 Dim db As NotesDatabase
 Dim view As NotesView
 Dim entry As NotesViewEntry
 Dim pv As NotesView
 Dim doc As NotesDocument
 Set db = session.CurrentDatabase
 Set view = db.GetView("By Category")
 Set entry = view.GetEntryByKey("Cars")
 Set pv = entry.parent
 Set doc = entry.Document
 Messagebox "Children: " & entry.ChildCount & Chr(10) _
 & "Descendants: " & entry.DescendantCount & Chr(10) _
 & "FTSearch score: " & entry.FTSearchScore & Chr(10) _
 & "Indent level: " & entry.IndentLevel & Chr(10) _
 & "Note ID: " & entry.NoteID & Chr(10) _
 & "Parent view UNID: " & pv.UniversalID & Chr(10) _
 & "Siblings: " & entry.SiblingCount & Chr(10) _
 & "Universal ID: " & entry.UniversalID
 
 If entry.IsCategory Then
   Messagebox "This view entry is a category."
 Else
   Messagebox "This view entry is not a category."
 End If
 If entry.IsConflict Then
   Messagebox "This view entry is a conflict document."
 Else
   Messagebox "Not a conflict document."
 End If
 If entry.IsDocument Then
   Messagebox "This view entry is a document."
 Else
   Messagebox "This view entry is not a document."
 End If
 If entry.IsTotal Then
   Messagebox "This view entry is a total."
 Else
   Messagebox "This view entry is not a total."
 End If
 If entry.IsValid Then
   Messagebox "This view entry is valid."
 Else
   Messagebox "This view entry is not valid."
 End If
End Sub

2. The following script is an agent that scans the current database for conflict entries and sends a mail message if any exist.


See Also