0

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.

Per Henrik Lausten
  • 21,331
  • 3
  • 29
  • 76
Nash
  • 57
  • 1
  • 9

1 Answers1

0

Use a custom control and a repeat control to dynamic bind fields. With the backend data. Check out this post

Dynamic Data Binding?

Community
  • 1
  • 1
Fredrik Norling
  • 3,461
  • 17
  • 21