How to write JavaScript code when inserting a new record into a Frevvo table (repeater)?

Comments

1 comment

  • Avatar
    Prajakta

    Try something like this:

    /*member DESCRIPTION, GROUP_NAME, LOCATION*/

    if(Save.clicked){
    var jsonArr = [];
    for (var i = 0; i < GROUP_NAME.value.length; i++) {
    jsonArr.push({
    GROUP_NAME: GROUP_NAME[i].value,
    DESCRIPTION: DESCRIPTION[i].value,
    LOCATION: LOCATION[i].value
    });
    }
    http.post('http://dofrevvotest:8082/database/COHORT/COHORTS', jsonArr);

    }

    Thanks,

    Prajakta

    0
    Comment actions Permalink

Please sign in to leave a comment.