Domino Code Fragment

Code Name*
Retrieve the Names of all the Views in a Database using the NotesView property, Name
Date*
04/28/2024
Source (or email address if you prefer)*
Rlatulippe@romac.com
IP address:.3.135.205.146
Description*
Retrieves the names of all the views in a database, use the NotesView property, Name in conjunction with the NotesDatabase View property and the ForAll statement.
Type*
LotusScript
Categories*
(Misc)
Implementation:
Required Client:
Server:
Limitations:
Comments:
Files/Graphics attachments (if applicable): Code:
To retrieve the names of all the views in a database, use the NotesView property, Name in conjunction with the NotesDatabase View property and the ForAll statement. Since the NotesDatabase View property gives you access to all the views in the database and their properties, you can use the ForAll statement to move from one view to another. As you retrieve each view, you can then use the Name property of the view to display the name of the view.

Click here to view the example.

Dim session As New NotesSession 'Declare session as a new Notes session
Dim db As NotesDatabase
'Declare db as a Notes Database
Dim view As NotesView
'Declare view as a Notes View
Set db = session.CurrentDatabase
'Set db to the current Notes database (open)
Forall x In db.Views
'Process each view in the database
Messagebox x.Name
'Display the name of each view
End Forall