Lotus Notes FAQ Visit Our Sponsor!

How can you tell if a view is Private?

There is no property in the view thtat lets you do this, but you can look at the design note for the view via this function:

Function IsPrivateView(v As Variant) As Integer

     ' From Hugh Pyle@NIP
     ' Since LotusScript doesn't give us a view property for this, we have to do the work ourselves.
     ' This is determined by opening the view note and checking for $Flags item containing the character "V".
     Dim vdoc As NotesDocument
     Dim db As NotesDatabase
     If Not (v Is Nothing) Then
          Set db=v.Parent
          Set vdoc = db.GetDocumentByUnid( v.UniversalID )
          If Not (vdoc Is Nothing) Then
               If vdoc.HasItem("$Flags") Then
                    If Instr(vdoc.GetItemValue("$Flags")(0), "V") Then
                    Elseif Instr(vdoc.GetItemValue("$Flags")(0), "p") Then
                    End If
               End If
          End If
     End If
End Function

Applies to Notes Versions: 4 4.5 4.6 5
Last Modified: February 23, 1998