SelectionFormula (NotesNoteCollection - LotusScript®)

Read-write. Formula that selects notes for inclusion in the collection.

Defined in

NotesNoteCollection

Data type

String

Syntax

To get: formula$ = notesNoteCollection .SelectionFormula

To set: notesNoteCollection .SelectionFormula = formula$

Usage

This property must be a valid Domino® formula that evaluates to True (includes the note) or False (excludes the note) for each note.

This property is initially an empty string, which is equivalent to selecting all notes.

This property is not a stand-alone specification. It intersects the other selection criteria.

This method is sometimes incorrectly used to make a view display a new selection of documents for an end user.

This method makes a modification to the design of the view and requires Designer access. If not, the view is private and the user is the owner of it.

There are problems with using this method to make a view display a new selection of documents for an end user:

Do not give end-users Designer access to an application.

If it is a shared view, users will interfere with each other's searches.

The Notes® client caches design information, and there's no way to tell it to update its cache (except for outlines). Exiting and re-entering the application usually works, but it's hard to programmatically ensure the user exited the application entirely.

It is an inefficient way to search unless the result set is very large. Use a full-text search instead.

If you use a composite application, you can set up an NSF component containing a view and make the view conduct a full-text search. If you are not in a composite application, there are other ways to control the UI to conduct searches for the user. Consult the Domino® Designer wiki for techniques.

Example