Examples: EntryCount property (NotesView - LotusScript®)

This view action displays the categories in a view if the entry count is not zero.

Sub Click(Source As Button)
  Dim ws As New NotesUIWorkspace
  Dim uiview As NotesUIView
  Dim view As NotesView
  Dim nav As NotesViewNavigator
  Dim entry As NotesViewEntry
  Dim msg As String
  Set uiview = ws.CurrentView
  Set view = uiview.View
  If view.EntryCount = 0 Then
    Messagebox "No documents in view",, "View empty"
    Set nav = view.CreateViewNav
    Set entry = nav.GetFirst
    Do While Not(entry Is Nothing)
      msg = msg & entry.ColumnValues(0) & Chr(13)
      Set entry = nav.GetNextCategory(entry)
    Messagebox msg,, "Categories"
  End If
End Sub