LOTUSSCRIPT/COM/OLE CLASSES
Examples: NotesViewNavigator class
1. This script displays the universal ID of the last document entry in a view navigator.
Dim session As New NotesSession
Dim db As NotesDatabase
Dim view As NotesView
Dim entry As NotesViewEntry
Dim nav As NotesViewNavigator
Set db = session.CurrentDatabase
Set view = db.GetView("By Category")
Set nav = view.CreateViewNav
Set entry = nav.GetLastDocument
Messagebox "UNID: " & entry.UniversalID
2. This script returns the next to last entry in the view navigator and puts the associated document in a folder.
Dim session As New NotesSession
Dim db As NotesDatabase
Dim view As NotesView
Dim entryA As NotesViewEntry
Dim entryB As NotesViewEntry
Dim nav As NotesViewNavigator
Dim doc As NotesDocument
Set db = session.CurrentDatabase
Set view = db.GetView("By Category")
Set nav = view.CreateViewNav
Set entryA = nav.GetLastDocument
Set entryB = nav.GetPrevDocument(entryA)
Set doc = entryB.Document
Call doc.PutInFolder("My Favorites")
3. This script displays the universal ID of the user-specified entry in a view navigator.
Dim session As New NotesSession
Dim db As NotesDatabase
Dim view As NotesView
Dim entry As NotesViewEntry
Dim nav As NotesViewNavigator
Dim doc As NotesDocument
Set db = session.CurrentDatabase
Set view = db.GetView("By Category")
Set nav = view.CreateViewNav
Set entry = nav.GetPos(Inputbox$("Entry position: "), ".")
Messagebox "Entry UNID: " & entry.UniversalID
See Also
NotesViewNavigator class
Glossary
Help on Help
Open Full Help Window
Glossary
Help on Help
Open Full Help Window