removeAll (NotesViewEntryCollection - JavaScript™)
Permanently removes the documents associated with the entries in a view entry collection from a database.
Defined in
NotesViewEntryCollectionSyntax
removeAll(force:boolean) : void
Parameter | Description |
---|---|
force |
|
Usage
All documents removed from the database as a result of this operation are also removed from the collection.The current pointer is reset to the first entry.
Examples
This button removes all documents in a view that match a search query.if (requestScope.query.isEmpty()) return;
if (!database.isFTIndexed()) database.createFTIndex(0, false);
var vec:NotesViewEntryCollection = database.getView("main").getAllEntries();
vec.FTSearch(requestScope.query);
if (vec.getCount() > 0) {
vec.removeAll(true);
requestScope.status = "Document(s) removed";
} else {
requestScope.status = "No match";
}