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.
@SetDocField($Ref; "Subject"; "More people are commuting by bicycle")
@SetDocField(@DocumentUniqueID; "name"; "Joseph Riley")
You write this input translation formula for the lastAction field on the Status form:
@SetDocField($Ref; "latestStatus"; lastAction );
lastAction
@SetDocField(@DbLookup(""; "Magnet":"Personnel.nsf"; "Staff"; "Joe Smith";
"uniqueid"); "Employee Title"; "Sales Associate")
@SetDocField(@DocumentUniqueID; "name"; "Joseph" : "Riley")
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