Appending multiple fields in Lotus Notes

352420 pts.
Tags:
Lotus Notes
Lotus Notes Fields
I've been writing a logging system from a form in Lotus Notes but I'm having trouble appending the information about the fields that are changed in the log fields. Currently, there are three fields that I'm using for Log_Date (date), Log_User and Log_Actions (Text). I tried using adding a comma in the log field to see if he will create a new line when displaying the form but I'm still getting a type mismatch on the case 2 line. How can I be able to append the new values in the log fields. Here's my code so far:
Sub Querysave(Source As Notesuidocument, Continue As Variant)
    ' Compare the values in the form after it is saved with its original values when the document is not a new document.    
    Dim doc As NotesDocument
    Set doc = Source.Document

    Dim session As New NotesSession
    Dim user As String
    user = session.CommonUserName

    If newDoc Then
        doc.Log_Date = Now()    
        doc.Log_User = user
        doc.Log_Actions = "New document created."
    Else        
        ' Load fields value to the array
        lastValues(0) = doc.QCR_No(0)
        lastValues(1) = doc.QCR_Mobile_Item_No(0)
        lastValues(2) = doc.QCR_Qty(0)

    ' Compared each value in the array to see if there is any difference
        Dim i As Integer
        For i = 0 To 2
            If lastValues(i) <> originalValues(i) Then
                Select  Case i
                Case 2 : doc.Log_Actions = doc.Log_Actions & "," & "Field QCR_Qty is changed"
                End Select
            End If
        Next
    End If
End Sub

Answer Wiki

Thanks. We'll let you know when a new response is added.

Try using the AppendToTextList method of the NotesItem class.

Discuss This Question:  

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following