@Margo so it goes like this:
user completes the New Form and gets redirected to Edit after saveing. There is a Data table on Edit form and I need the first raw to be prepopulated with "1" in the first column and a field value from the form in the second.
I tried adding your code after mine like this:
fd.rendered(function(){
var dt_rows = [];
var row1 = {PYear: "1"};
dt_rows.push(row1);
fd.control('FA').value = dt_rows;
});
fd.rendered(function(){
var row = fd.control('FA').widget.dataSource.data()[0];
row.set("VolProj", fd.field('CEW_x002d_Base').value);
});
and tried to insert it into mine as well:
fd.rendered(function(){
var dt_rows = [];
var row1 = {PYear: "1"};
dt_rows.push(row1);
fd.control('FA').value = dt_rows;
var row = fd.control('FA').widget.dataSource.data()[0];
row.set("VolProj", fd.field('CEW_x002d_Base').value);
});
but I still can't get the second column to be populated with field value