I want to have a rich text field to add comments to while protecting
what is already in there without changing user access control or
redesigning the database.
It works like this (with 3 fields):
1) Computed rich text field, CommentsDisplay with formula Comments
2) Rich text field, Comments, which does not show up on form at all --
it contains previous comments
3) Editable rich text field, NewComments -- where th user add his
input and attach docs
and the code in the PostSave form event :
Sub Postsave(Source As Notesuidocument)
Dim mainDoc As NotesDocument
Set mainDoc=Source.Document
Call mainDoc.RemoveItem( "CommentsDisplay" )
Dim rtitemA As Variant
Dim rtitemB As Variant
Set rtitemA = mainDoc.GetFirstItem( "Comments" )
Set rtitemB = mainDoc.GetFirstItem( "NewComments" )
Call rtitemA.AppendRTItem( rtitemB )
Call rtitemB.Remove
Call mainDoc.Save(False, True )
End Sub
but it is a strange behaviour:
step 1: I create a new doc
step 2: I put the string "1" in the NewComments field
step 3: I save the doc
step 4: when I open the doc :
Comments field "1"
CommentsDisplay field nothing
NewComments field nothing
step 5: I put the string "2" in the NewComments field
step 6: I save the doc
step 7: when I open the doc :
Comments field "12"
CommentsDisplay field "1"
NewComments field nothing
step 8: I put the string "3" in the NewComments field
step 9: I save the doc
step 10: when I open the doc :
Comments field "123"
CommentsDisplay field "12"
NewComments field nothing
Why the field CommentsDisplay which had a computed formula doesn't refresh on doc open ?!? (it is with a step backward than Comments field ...) ?