Given selection criteria for a document, returns all documents in a database that meet the criteria.
search(formula:string, dt:NotesDateTime) : NotesDocumentCollection
search(formula:string, dt:NotesDateTime, max:int) : NotesDocumentCollection
Parameter | Description |
---|---|
formula | A Notes @function formula that specifies the selection criteria. |
dt | A start date. The method searches only documents created or modified since the cutoff date. Can be null to indicate no cutoff date. |
max | The maximum number of documents you want returned. Specify 0 to receive all matching documents (up to 5,000). |
Return value | Description |
---|---|
DocumentCollection | An unsorted collection of documents that match the selection criteria. |
var title:string = database.getTitle(); var formula:string = "Subject=\"" + requestScope.query + "\""; var dc:NotesDocumentCollection = database.search(formula); var matches:int = dc.getCount(); requestScope.status = "Search of \"" + title + "\" found " + matches + " document(s) with Subject = \"" + requestScope.query + "\"";