removeAllFromFolder (NotesViewEntryCollection - JavaScript)

Removes the documents associated with the entries in a view entry collection from a specified folder.

Defined in

NotesViewEntryCollection

Syntax

removeAllFromFolder(folderName:string) : void
Parameter Description
folderName The name of the folder from which to remove the documents. The folder may be personal if the program is running on the workstation. If the folder is within another folder, specify a path to it, separating folder names with backslashes and escaping the backslashes in a literal, for example: removeAllFromFolder("Vehicles\\Bikes");

Usage

This method does nothing for documents not in the folder you specify. This method does nothing if the folder you specify does not exist.

Examples

This button removes from a folder 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.removeAllFromFolder("searchResults")
	requestScope.status =  "Document(s) removed from folder";
} else {
	requestScope.status =  "No match";
}