I have the following code:
mbrs = doc.AppendItemValue( “Members”, email )
The code is inside a loop. I am trying to read all email fields from all docs and put all of them into the Members field. The problem I am having is, it is creating x amount of Members fields w/ only 1 entry.
Subject: appending values into 1 field in script
If an item of the same name already exists in a document, AppendItemValue creates a second item of the same name, so try like this
set item = doc.ReplaceItemValue(“Members” , “”)
…
…
while …
email = …
call item.appendToTextList(email)
wend…
Subject: appending values into 1 field in script
Just pasting from the notes help :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.
why dont u instead use
1> if this is a multi-valued field
create an array and then assign it to the field
2> if not
create a string and assign it to the field value