Examples: IsPrivate property (NotesView - LotusScript®)

This example returns a list of the private views owned by the current user in the current database.

Sub Initialize
  Dim session As New NotesSession
  Dim db As NotesDatabase
  Dim resultList As String
  Dim views As Variant
  resultList = ""
  Set db = session.CurrentDatabase
  views = db.Views
  Forall view In views
    If view.IsPrivate Then
      If resultList = "" Then
        resultList = view.Name
      Else
        resultList = resultList + ", " + view.Name
      End If
    End If
  End Forall
  If resultList = "" Then
    resultList = "None"
  End If
  Messagebox resultList,, "The private view(s) are:"
End Sub