LOTUSSCRIPT/COM/OLE CLASSES
Examples: Accessing entries from a view navigator
1. This example returns the specified view entry in a view navigator and places the documents associated with them in a folder called Over Stock.
Sub Initialize
Dim session As New NotesSession
Dim db As NotesDatabase
Dim view As NotesView
Dim nav As NotesViewNavigator
Dim entryA As NotesViewEntry
Dim entryB As NotesViewEntry
Dim doc As NotesDocument
Set db = session.CurrentDatabase
Set view = db.GetView("By Category")
Set nav = view.CreateViewNavFromCategory("Stock")
Set entryA = nav.GetFirst
Set entryB = nav.GetEntry(entryA)
Set doc = entryB.Document
Call doc.PutInFolder("Over Stock")
End Sub
2. This example returns the first document in a Notes view navigator and displays its universal ID.
Sub Intialize
Dim session As New NotesSession
Dim db As NotesDatabase
Dim view As NotesView
Dim nav As NotesViewNavigator
Dim entry As NotesViewEntry
Set db = session.CurrentDatabase
Set view = db.GetView("By Category")
Set nav = view.CreateViewNav
Set entry = nav.GetFirstDocument
Messagebox "Universal ID: " & entry.UniversalID
End Sub
3. This example returns the entry previous to the specified entry and displays the number of children for that entry.
Sub Intialize
Dim session As New NotesSession
Dim db As NotesDatabase
Dim view As NotesView
Dim nav As NotesViewNavigator
Dim entryA As NotesViewEntry
Dim entryB As NotesViewEntry
Set db = session.CurrentDatabase
Set view = db.GetView("By Category")
Set nav = view.CreateViewNav
Set entryA = nav.GetLast
Set entryB = nav.GetPrev(entryA)
Messagebox entryB.ChildCount
End Sub
See Also
Accessing entries in a view navigator
Glossary
Feedback on
Help
or
Product Usability
?
Help on Help
All Help Contents
Glossary