Examples: Accessing entries from a view navigator
- 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
- 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
- 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