putAllInFolder (NotesDocumentCollection - JavaScript)

Adds all the documents in the collection to a specified folder.

Defined in

NotesDocumentCollection

Syntax

putAllInFolder(foldername:string) : void

putAllInFolder(foldername:string, createonfail:boolean) : void

Parameter Description
foldername The name of the folder in which to place the documents. The folder may be personal if the script is running on the workstation. 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).
createonfail If true (default), creates the folder if it does not exist. If false, throws an exception if the folder does not exist.

Usage

For remote (IIOP) operations only, this method moves the current pointer to the first document in the collection.

If a document is already inside the folder you specify, this method does nothing for that document.

Examples

This button adds documents that match a search query to 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.putAllInFolder("Search Results", true);
} else {
	requestScope.status = "No query";
}