CreateView (NotesDatabase - LotusScript®)

Creates a view.

Note: This method is new with Release 6.

Defined in



Set notesView = notesDatabase .CreateView( [ viewName$ ] , [ viewSelectionFormula$ ] , [ templateView ] , [ prohibitDesignRefreshModifications ] )



String. Optional. A name for the view. Defaults to the "(untitled)" view. The view is created even if this name duplicates an existing view.


String. Optional. A selection formula. Defaults to either:

  • The selection formula of the template view.
  • "SELECT @All" if no template view exists.

If specified, this formula overrides the selection formula of the template view.


NotesView. Optional. An existing view from which the new view is copied. Defaults to either:

  • The view checked as "Default design for new folders and views" in the database.
  • None if no view in the database is specified as the default design.
Note: The template view can not be of type Shared, desktop private on first use.


Boolean. Optional.

  • True (default) prohibits the view design from being refreshed.
  • False allows the view design to be refreshed.

Return value


The new view.


If no template view exists, the new view contains one column with "@DocNumber" as its value. The template view must be accessible to the program, so can be a public view or a private view owned by the effective id running the agent, but can not be a private view stored in the desktop.