Given the unique ID of a document, sets the value of a specific field on that document. The document must reside in the current database.
@SetDocField( documentUNID ; fieldName ; newValue )
documentUNID
Text. The unique ID of a document. @DocumentUniqueID specifies the unique ID of the current document. To specify the unique ID of the parent document, use $Ref as the first parameter. $Ref is a special field on a response document that contains the unique ID of the parent document.
fieldName
Text. The name of a field on the document, enclosed in quotation marks. If you store the field name in a variable, omit the quotation marks here.
newValue
Text, number, time-date, time-date range, or list thereof. The value you want to give to the field.
This function does not work in column or selection formulas. @SetDocField is particularly useful in field, button, and agent formulas.
Note Starting with Release 6, you can use @SetDocField to set the value of a field in the current document, not just in other documents in the same database.
FieldSetText method of LotusScript NotesUIDocument class
GetDocumentByUNID method of LotusScript NotesDatabase class
ReplaceItemValue method of LotusScript NotesDocument class
getDocumentByUNID method of Java Database class
replaceItemValue method of Java Document class
See examples