I am having a form with multiple fields like "Persp_1", "Persp_2", "Persp_3"...., Goal_1, Goal_2, Goal_3.... etc. Currently I am assigning the values from the xPage component to the backend document via a common function as belows:
function pushDataToBackEnd(sourceDoc:NotesDocument, fieldArray){
try{
for(var i=0; i<fieldArray.length;i++){
for(var j=0; j<12; j++){
a = j+1;
var fieldName = fieldArray[i] + "_" + a;
var fieldValue = getComponent(fieldName).getValue();
if(fieldValue != ""){
sourceDoc.replaceItemValue(fieldName,fieldValue);
}
}
}
return true;
}
catch(exp){
return exp
}
return true;
}
The problem is I also need to bind the components of the xPage with the backend fields on the notes form. Is there a way in which I can do this.