Examples: Locating an entry in a view

  1. This example retrieves an entry from a view by key and displays its universal ID.
    Sub Initialize
      Dim session As New NotesSession
      Dim db As NotesDatabase
      Dim view As NotesView
      Dim entry As NotesViewEntry
      Set db = session.CurrentDatabase
      Set view = db.GetView("By Category")
      Set entry = view.Getentrybykey("Cars")
      Messagebox entry.Universalid
    End Sub
  2. This example retrieves all of the entries under the Spanish leather category from the Stock view.
    Sub Initialize
      Dim session As New NotesSession
      Dim view As NotesView
      Dim vc As NotesViewEntryCollection
      Set db = session.CurrentDatabase
      Set view = db.GetView("Stock")
      Set vc = view.GetAllEntriesByKey("Spanish leather", False)
      Call vc.PutAllInFolder("Boots")
    End Sub