GetAllEntriesByKey (NotesView - LotusScript®)

Finds view entries of type document based on their column values within a view. You create an array of keys, where each key corresponds to a value in a sorted column in the view. The method returns all entries whose column values match each key in the array.

Note: This method is new with Release 5.

Defined in

NotesView

Syntax

Set notesViewEntryCollection = notesView .GetAllEntriesByKey( keyArray [, exactMatch% ] )

Parameters

keyArray

String (variable-length only), integer, long or double value, or array of string, number, DateTime, or DateRange objects. Each element in the array is compared to a sorted column in the view. The first element in the array is compared to the first sorted column in the view; the second element is compared to the second sorted column; and so on.

exactMatch%

Boolean. Optional. Specify True if you want to find an exact match. All entries that match the key exactly are returned. If you specify False (the default) or omit this parameter, a partial match succeeds. A partial match returns all entries that match the initial characters of the key.

Return value

notesViewEntryCollection

A NotesViewEntryCollection. A collection of all entries in the view whose column values match each of the values in the keyArray. If no entries match, the collection is empty and the count is zero.

Usage

For the GetAllEntriesByKey method to work, you must have at least one sorted column for each key.

If this method is used under COM, with a keyArray parameter of an array, it must be defined as an array of type Variant.

This method returns all the view entries of type document whose column values match the keys. To locate just the first entry, use the GetEntryByKey method.

Entries returned by this method are in view order and provide access to ColumnValues.

Matches are not case-sensitive. For example, "Turban" matches "turban." In an exact match, "cat" matches "cat" but does not match "category," while "20" matches "20" but does not match "201." In a partial match, "T" matches "Tim" or "turkey," but does not match "attic," while "cat" matches "catalog" or "category," but does not match "coat" or "bobcat."

The use of partial matches with multiple keys may result in missed entries. If the first key is partial and the second column does not sort the same with the partial key as with the exact key, entries that fall out of sequence are missed.

If any columns are formatted with both categories and subcategories in the same column (using the "\\" special character), the method will not find the entries.

This method is similar to GetAllDocumentsByKey.

Example