removeAllFromFolder (NotesDocumentCollection - JavaScript)

Removes all documents in the collection from the specified folder.

Defined in

NotesDocumentCollection

Syntax

removeAllFromFolder(foldername:string) : void
Parameter Description
foldername The name of the folder from which to remove the document. The folder may be personal if the script is running on a client. If the folder is within another folder, specify a path to it, separating folder names with backward slashes. For example, Vehicles\Bikes (Vehicles\\Bikes in a JavaScript literal).

Examples

This button removes documents that match a search query from a folder in the current database.
var dc:NotesDocumentCollection = database.getAllDocuments();
var query:string = requestScope.query;
if (!query.isEmpty()) {
	query = "\"" + query + "\"";
	database.updateFTIndex(true);
	dc.FTSearch(query);
	dc.removeAllFromFolder("Search Results");
} else {
	requestScope.status = "No query";
}

Usage

This method moves the current pointer to the first document in the collection.

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