The lotusscript command, named "AppendItemValue" in the class "NotesDocument" is supposed to work like, "FieldAppendText" in the "NotesUIDocument" class. I believe I am right here.
Yes I started a fragment of code with the same belief and found some beautiful results. Yes I could have never arrived at that with out this beautiful worthless command.
Let me make myself clear with the following procedure.
1.Let me say I have got a field named as "MyField" in a document.
2.Now I say, doc.AppendItemValue("MyField","New Value").
3. Say I am doing it for say 3 times and am saving the document
The expected result is, say if the old value of the field is "Old Value" then the result cos of above process must be "Old ValueNew ValueNew ValueNewValue".
4. But the results are very inconsistent and random.
The following is one of the possible results that I will definetly obtain (I mean I will never end up with the expected result hi hi).
If you check the document properties then you would find a item named "MyField" with value "Old ValueNew Value" and two other items named "MyField" with values "New Value".
Can you do this through any other means....
AppendItemValue is awesome hi hi :O)
A possible fix to this issue is posted in the following location:
http://ozinisle.blogspot.com/2010/01/work-around-for-docappenditemvalue.html
:)
Nope, you are not right. The Designer help says: { If an item of the same name already exists in a document, AppendItemValue creates a second item of the same name, and the duplicate items are not accessible except through a work-around. If you are creating a new document, AppendItemValue is safe.}
ReplyDeleteIf you want to append a value to an item containg a Text list, there is { Call notesItem.AppendToTextList( newValue ) }