Hi There,
Looking for a little help…I have an XPage with a dojo dialog box for selecting multiple values. The code it uses to put the selected values into the field is :
//function printToLog(stuff) {
// _dump(“\r\nPRINT START\r\n”);
// _dump(stuff);
// _dump(“\r\nPRINT END\r\n”);
//}
var viewPanel=getComponent(“viewPanel1”); //get the componet of viewPanel
var docIDArray=viewPanel.getSelectedIds(); //get the array of document ids
//printToLog(viewPanel.getSelectedIds())
for(i=0;
i < docIDArray.length;
i++){
var docId=docIDArray[i];
//printToLog(docId)
var doc=database.getDocumentByID(docId);
//printToLog(doc)
if(doc != null){
var pickthis1 = doc.getItemValueString("PmpType");
//printToLog(pickthis1);
//printToLog(lKey);
//printToLog(circ);
if(pickthis1 != null){
if (@Contains(SOP.getValue("PumpType"),pickthis1)){
SOP.setValue("PumpType",SOP.getValue("PumpType"));
}else{
if(SOP.getValue("PumpType") == null || SOP.getValue("PumpType") == '')
{
SOP.setValue("PumpType",pickthis1);
}else{
SOP.setValue("PumpType",SOP.getValue("PumpType") + ", " + pickthis1);
}
}
}
}
}
SOP.setValue(“PumpOK”,“OK”);
As you can see, I am appending the value onto existing values (if they exist) using a ", ". On the form in the backend, the field is a Dialog List box, which uses the same separator. I have a view which “displays multiple values as separate entries”. This works for docs created in the client, but not the docs created in the XPage. But when i open the one cretaed by the xpage in the client and save it, the view then shows them as separate.
Am I missing something here? Is there something i need to do to get it showing as separate entries?
Thanks very much.