9.73 DOM_SEARCH_DOCUMENTS
Þ Note: Built-In Function Rules.
Searches a database for documents/data notes matching selection criteria or using a previously created view. If no selection criteria or view is specified then all documents/data notes in the database will match.
The result of this Built-In Function is a Note ID table which can be used to read documents sequentially using the DOM_GET_NXT_DOCUMENT Built-In Function. When selection criteria is specified, the selection formula is compiled and a Note ID table built for all documents matching the criteria. When a view is specified, a collection will be built for the view and all Note Ids for the collection will be added to the Note ID table.
Note that if selection criteria is specified, it must conform to the same syntax as view selection formulas which consist of Notes @functions, field names and logical operators. Selection criteria must be quoted correctly. The syntax of the selection criteria will not be validated.
When the processing of all documents is complete the DOM_END_SEARCH_DOCS Built-In Function must be used.
Some general guidelines for using a view versus using selection criteria are:
- Use selection criteria to select documents from a database when the selection criteria is not known until run time, if the performance of the program is not important or the program will be run only a few times.
- Use a view to select documents from a database when you want to process the documents in a certain order or the performance of the program is important. You will usually find the document selection using a view to be faster than the equivalent selection using selection criteria.
For use with
|
Arguments
|
Return Values
|
Examples
Refer to these Domino Built-In Function Examples:
Example 2: Selecting documents from a Database using a view
Example 4: Updating Documents selected from a Browselist
Technical Notes
This Built-In Function uses the standard Lotus Notes APIs IDCreateTable, NSFFormulaCompile, NSFSearch, IDEntries, IDInsert, NIFFindView, NIFOpenCollection, IDCreateTable, NIFReadEntries and NIFCloseCollection. All security and integrity issues related to the use of this Built-In Function are according to normal Lotus Notes API use for the current platform.