I need some Lotus Script help to appending text to a multi-value field using a messagbox.
Private Function PromptRemarks( row%, doc As notesdocument ) As String
' prompts the remarks dialog
' returns the remarks
Dim wfuiwork As New NotesUIWorkspace
Dim docDlg As New NotesDocument( doc.ParentDatabase )
Dim remarks$
Dim subj As Variant
’ Added to display contents of field
Dim workspace As New NotesUIWorkspace
Dim wfNotes
Dim uidoc As NotesUIDocument
On Error Goto errorHandling
Call docDlg.ReplaceItemValue( WF_FIELD_DLG_MSG, MSG_DLG_REMARKS )
If Not wfuiwork.dialogbox( WF_FORM_DLG_REMARKS, True, True, False, False, False, False, MSG_DLG_TITLE_REMARKS, docDlg, False, False,True ) Then
Print MSG_USER_CANCEL
PromptRemarks =""
Else
’ Display the current value of Remarks field
wfNotes = (WF_FIELD_REMARKS & row%)
subj = doc.GetItemValue( wfNotes )
remarks$ = docDlg.GetItemValue( WF_FIELD_DLG_TEXT )(0)
Call doc.AppendItemValue( WF_FIELD_REMARKS & row%, remarks$ )
PromptRemarks = remarks$
End If
Exit Function
errorHandling:
Call ErrorHandling( "PromptRemarks", Err, Error$, "Row: " & Cstr(row%))
PromptRemarks = ""
Exit Function
End Function
doc.AppendItemValue doesn’t do anything to the field. However, doc.ReplaceItemValue works fine to replace the entire field with the new value.
Please help.