stampAll (NotesDocumentCollection - JavaScript)

Replaces the value of a specified item in all documents in a collection.

Defined in

NotesDocumentCollection

Syntax

stampAll(itemname:string, value:Object) : void
Parameter Description
itemname The name of the item.
value A value appropriate for the item type. See replaceItemValue.

Usage

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

If the item does not exist, it is created.

The item values are immediately written to the server documents. You do not have to use the save method of NotesDocument after this method. However, any documents modified by your script must be saved before calling this method.

This method does not modify existing NotesDocument objects. Documents must be retrieved again to see the changes.

Examples

This button replaces an item value in documents that match a search query 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.stampAll("quantity", 15);
} else {
	requestScope.status = "No query";
}