Multivalues returned as single string with no separation

Hi, I am the using address book lookup code over the web that I picked up from this site. It seems to work great for the single user entry however this is first time I am trying to use the multiple user entries lookup function and having some problems. The users selected are being put as one string in the field rather than a list with a separation of comma, space or semi-colon between them. I have tried making the editable field that received entries text and names type with allow mult-vlaues checked and all the other separators values. Does some know how could I change this code so the values returned are in form of a list with a comma or semi-colon. I need the separation since I am counting the number of users in a this field. Here is the code:

Using Web Address Book Dialog box code from Notes:

  1. Add the following code to the form “HTML Head Content” section:

_tDb := “names.nsf”;

_is6 := @TextToNumber(@Version) > 171;

"

" +

@If(_is6;

"

";

“”

)

  1. Create a text or name field on the form to receive the entries selected by the user in the address dialog.

  2. Add Computed text with pass thru HTML, to the right of the name field created in step 2 with the formula:

REM {window.hDlgAddrSingle for single selection & window.hDlgAddrMulti for multiple selections};

_tDb := “names.nsf”;

_tLabelOneItem := “YourField”;

@If(@ClientType = “Notes” | !@IsDocBeingEdited; @Return(“”); “”);

_tFieldName := “YourField”;

_tDb := @ReplaceSubstring(@Subset(@DbName; -1); " “:”\" ; “+”:“/”);

“<a onclick=" initTools(); var hDlg = window.hDlgAddrSingle; hDlg.sMsgOneEntry = '”+ _tLabelOneItem +“'; hDlg.hDestField = document.forms[0].” + _tFieldName + “; hDlg.dlOpen(); return false; " href=""><img src="/” + @Subset(@DbName;-1) + “/cal.gif?OpenImageResource" width="15" height="11" border="0" alt="">”

  1. Change the “_tFieldName” and “tLabelOneItem” variables in the code above to the name of the field you created in step 2. You may need to set the Maximum Name and Password setting on the ACL Adv page to Editor.

Regards,

Armand

Subject: RE: multivalues returned as single string with no separation

The comment says “window.hDlgAddrSingle for single selection & window.hDlgAddrMulti for multiple selections”. But your formula says hDlgAddrSingle. So how are you expecting to get multiple names?

Subject: RE: multivalues returned as single string with no separation

Thanks for the reply, I wish it was that easy. I copied the code from a word document I created as my note for implementing address book over the Web. The actual code I am using to get the multivalues is as below:

“<a onclick=" initTools(); var hDlg = window.hDlgAddrMulti; hDlg.sMsgOneEntry = '”+ _tLabelOneItem +“'; hDlg.hDestField = document.forms[0].” + _tFieldName + “; hDlg.dlOpen(); return false; " href=""><img src="/” + @Subset(@DbName;-1) + “/cal.gif?OpenImageResource" width="15" height="11" border="0" alt="">”