LOTUSSCRIPT/COM/OLE CLASSES
The New method of the NotesItem class creates a new item in a document and assigns a value to it. You can also use the ReplaceItemValue method or AppendItemValue method of the NotesDocument class to create a new item. The latter is not recommended because if another item exists with the same name, the new item does not replace that item but becomes an additional item with the same name.
To assign and reassign values to an item, you can:
After creating or replacing an item, you must call the Save method for the NotesDocument object containing the item or the update is lost when the program exits.
Computed fields are not recalculated when you save a document. If you change items that affect a computed field and want the new value to be available immediately (for example, if you want the user to see the new value in a view or you want to use the new value in a calculation), you must calculate the value in the script.
The user cannot see the new item as a field in the document unless you add the field to the form design. However, the item exists and can be accessed programmatically.
An item cannot appear in a view unless the IsSummary property is True. IsSummary is always False for rich text items, which cannot appear in views. IsSummary is initially False if the item is created with New or ReplaceItemValue.
You can replace the value of an item in every document of a document collection with the StampAll method of NotesDocumentCollection. This method writes immediately to the back-end document. Be sure to save all documents (Save method of NotesDocument) that you have modified in the script before using StampAll on them. You do not have to save after StampAll.
Example See Also