Matching Multivalue item between two fields

Hi,

I have two multivalue field. “Field1” contains common name and “Field2” contains abbreveated name. I like to match one by one from “Field1” with “Field2” and if is their anymatch then it will store that value from “Field2” to “Field3” field. “Field3” is author field. I used the code bellow but it takes only the first value.

Projectdoc is a backend document

Doc1 is a uidoc

Set textListItem = Doc1.GetFirstItem( “TaskAuthor” )

Set textListItem2 = Doc1.GetFirstItem(“CoTaskOwner”)

ret = Split(Doc1.CoTaskOwner(0), “,”)

Forall idAttrib In projectdoc.GetItemValue(“TeamMemberList”)

Forall taskAttrib In ret

If taskAttrib =Strrightback( Strleftback(idAttrib,“/”),“=”) Then

Call textListItem.AppendToTextList( idAttrib)

	Set textListItem = Doc1.GetFirstItem( "TaskAuthor" )

End If

End Forall

End Forall

Thanks.

Subject: Matching Multivalue item between two fields

If TeamMemberList actually contains abbreviated names, StrRightBack( Strleftback(idAttrib,“/”),“=”) will be “”. I would use NotesName objects for both (just in case) and compare the .Common properties. It won’t matter, then, what the actual format in either field is.

Subject: @Replace()?

Could you use a formula like this:

Temp:=@Name([CN];Field2);

FIELD Field3:=@Replace( Field1; Temp; Field2)