例: ビューのエントリを検索する

  1. 次の例では、キーに基づいてビューからエントリを取り出し、そのエントリのユニバーサル 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. 次の例では、「Spanish leather」カテゴリの全エントリを [Stock] ビューから取り出します。
    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