Domino Code Fragment

Code Name*
How can you tell if a view is Private?
Date*
04/28/2024
Source (or email address if you prefer)*
Rlatulippe@romac.com
IP address:.3.142.12.240
Description*
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:
Type*
LotusScript
Categories*
(Misc)
Implementation:
Required Client:
Server:
Limitations:
Comments:
Files/Graphics attachments (if applicable): Code:

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
'
IsPrivateView=False
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
IsPrivateView=privateview%
Elseif Instr(vdoc.GetItemValue("$Flags")(0), "p") Then
IsPrivateView=privateonfirstuse%
End If
End If
End If
End If
End Function