Subject: Concatenating 2 list fields using Formula
Dim w As New notesuiworkspace Dim doc As notesdocument
Set doc = w.CurrentDocument.Document
Dim a1 As Variant
Dim a2 As Variant
Dim a3 As Variant
a1 = doc.GetItemValue("a1")
a2 = doc.GetItemValue("a2")
a3 = Evaluate("a1+'~'+a2", doc)
Call doc.ReplaceItemValue("a3", a3)
slightly confused by your question so some clarification first
(BTW: it seems to me you are using the word ‘FORMULA’ to mean the generic term ‘lines of programming’ rather than its specific one in Lotus Domino of the programming facility FORMULA rather than LOTUSSCRIPT… I apologise if I’m wrong here)
Well back to basics::
Fundamentally You have a document with 2 items (members1 Members2)
both text, multiple value - with the same number of elements)
Lets say Members1 is “A” : “B” : “C”
and Members2 is “x” : “y” : “z”
You wish to create a third item (lets say named Members2) and give it a value
“A~x” : “B~y” : “C~z”
Is that correct ?
IF No please clarify.
If YES then doing this in FORMULA is easy using as you say Members1 + “~” + Members2
since the Formula operator “+” acts what is called pairwise on multiple values
(You might put this in a formula agent as
FIELD Members3 := Members1 + “~” + Members2 ;
)
However you seem to have mentioned LOTUSCRIPT where teh simple + operator is NOT pairwise.
You could write a loop in LS to deal with this … however if the two items are on the same document why not take advantage of the FORMULA dialect by