var viewPanel:com.ibm.xsp.component.xp.XspViewPanel = getComponent("viewPanel1"); var docIDArray = viewPanel.getSelectedIds(); var pickData = new Array(); for( i=0 ; i < docIDArray.length ; i++ ){ var docId = docIDArray[i]; var doc = database.getDocumentByID(docId); //get value if(doc != null){ pickData[i] = doc.getItemValueString("MailAddress") } } if(pickData != null){ //replace value dominoDocument1.replaceItemValue("SendTo", pickData) }