removeItem (NotesXspDocument - JavaScript)

Removes an item.

Syntax

removeItem(fieldName:string) : void
Parameter Description
fieldName The name of the item.

Usage

This method removes all items with the specified name.

You must save (NotesXspDocument - JavaScript) the document for the change to take effect in the data store.

Examples

This button removes the number item from the current document if it exists.
if (document1.hasItem("number")) {
	document1.removeItem("number");
	document1.save();
	requestScope.alist = "Removed number item";
} else {
	requestScope.alist = "No number item in document";
}