Query (NotesDocumentCollection - JavaScript)

Read-only. The text of the query that produced a document collection if the collection results from a full-text or other search.

Defined in

NotesDocumentCollection

Syntax

getQuery() : string

Usage

For collections produced without a search, this property returns an empty string.

Examples

A button processing a document collection assigns the NotesDocumentCollection object to a global variable. This computed field queries the global variable and displays its query if it is sorted.
var dc:NotesDocumentCollection = requestScope.dc;
if (dc != null) {
	return dc.isSorted() ? "Indexed on " + dc.getQuery() : "Unsorted collection";
}