Domino Code Fragment

Code Name*
GetAllviews Sub Routine
Date*
04/29/2024
Source (or email address if you prefer)*
Rlatulippe@romac.com
IP address:.3.144.151.106
Description*
When called GetAllviews will list all the views and folders in the current database, using the Views method of NotesDatabase Class.
Type*
LotusScript
Categories*
(Misc)
Implementation:
Required Client:
Server:
Limitations:
Comments:
Files/Graphics attachments (if applicable): Code:
GetAllviews Sub Routine

Sub GetAllviews

When called GetAllviews will list all the views and folders in the current database, using the Views method of NotesDatabase Class.

Sub Routine Syntax

GetAllviews

Formal Parameters

None

Return value

None

Sub Routine

Sub GetAllviews
Dim session As New NotesSession
Dim db As NotesDatabase
Dim sViewList As String
Set db = session.CurrentDatabase

'-- Step through Views Array
Forall v In db.Views
'-- Concatenate each element in db.view to sViewList for display to screen via messagebox
If sViewList = "" Then
sViewList = v.name
Else
sViewList = sViewList & Chr$( 13 ) & v.Name
End If
End Forall
Messagebox sViewList, MB_ICONINFORMATION, "This is a list of all the views and folders"
End Sub

Usage

GetAllviews does not receive parameters.

Example

This example will call GetAllviews which will list all the views and folders in the current database, using the Views method of NotesDatabase Class.

Sub Click(Source As Button)
Call GetAllViews
End Sub