NotesViewEntryCollection class (LotusScript®)

Represents a collection of view entries, selected according to specific criteria. This class provides you mainly with a collection of documents in a view-sorted order.

Note: This class is new with Release 5.

Containment

Contained by: NotesView

Contains: NotesViewEntry

Properties

Count

Parent

Query

Methods

AddEntry

Clone

Contains

DeleteEntry

FTSearch

GetEntry

GetFirstEntry

GetLastEntry

GetNextEntry

GetNthEntry

GetPrevEntry

Intersect

MarkAllRead

MarkAllUnread

Merge

PutAllInFolder

RemoveAll

RemoveAllFromFolder

StampAll

StampAllMulti

Subtract

UpdateAll

Access

A ViewEntryCollection represents all or a subset of all entries in a view. The NotesView AllEntries property and GetAllEntriesByKey method return ViewEntryCollection objects.

The FTSearch method in NotesViewEntryCollection changes the content of the collection.

Usage

ViewEntryCollections never contain categories or totals, only entries that correspond to documents. The methods and properties in NotesViewEntryCollection are the same as those for NotesDocumentCollection, except for IsSorted, because this property is always True for NotesViewEntryCollection.

Current® Pointer

A current pointer is maintained for view entry collections. All navigation methods set the current pointer to the retrieved entry. Add and Delete methods do not move the current pointer. The current pointer is set back to the first document after FTSearch and RemoveAll methods.

Automatic updates: avoid

Avoid automatically updating the parent view by explicitly setting AutoUpdate to False. Automatic updates degrade performance and may invalidate entries in the collection ("Entry not found in index"). You can update the view as needed with Refresh.

Duplicate entries

Duplicate entries exist when a document is categorized under multiple categories. Navigating over duplicate entries works except in the following situations:

  • GetNthEntry method returns the first ViewEntry instance for the document.
  • GetEntry method returns the first ViewEntry instance for the document if the document is not part of this collection.
  • DeleteEntry method deletes the first instance. You can delete multiple instances with multiple calls to this method.
  • AddEntry method does not allow duplicates.

Example