stampAll (NotesViewEntryCollection - JavaScript™)
Replaces the value of a specified item in the documents of all the entries in a view entry collection.
Defined in
NotesViewEntryCollectionSyntax
stampAll(itemName:string, value:any) : void
Parameter | Description |
---|---|
itemName |
The name of the item. |
value |
A value appropriate for the item type. |
Usage
If the item does not exist, it is created.The item values are immediately written to the documents in storage. You do not have to use the save method of NotesDocument after this method. However, any documents modified by your program 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 stamps 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.stampAll("status", "obsolete");
requestScope.status = "Document(s) stamped";
} else {
requestScope.status = "No match";
}