GetView (NotesDatabase - LotusScript®)

Finds a view or folder in a database, given the name or alias of the view or folder.

Defined in



Set notesView = notesDatabase .GetView( viewName$ )



String. The name of a view or folder in a database. Case insensitive. Use either the entire name of the view or folder (including backslashes for cascading views and folders), or an alias.

Return value


NotesView. The view or folder for which the name or alias matches viewName$. Returns Nothing if no match is found.


Using getView returns public views and folders and private views and folders that are owned by the effective id running the agent. Private views stored in the desktop are not returned.

When specifying the viewName$ parameter, do not use the view name and its alias together: for example, specifying "By Author|AuthorView" does not work. Use either the view name ("By Author") or its alias ("AuthorView").

When the view or folder name contains underscores to indicate menu accelerators, you have the option of either including or excluding the underscores. The method works more efficiently, however, if you include the underscores.