I am trying to set a calculated column in Oracle interactive Grid. Its value must be the sum of two other columns. ( P1_AMT and P2_AMT. The calculated column is TOTAL_AMT. its set as a text field and source is none. In java initialization section I added the following code. However Total Amt is empty. Can someone help ? I am on Oracle apex 20.2 using chrome
function(options){
options.defaultGridColumnOptions = {
dependsOn: ['P1_AMT', 'P2_AMT'],
calcValue: function(_argsArray, model, record){
const AMT1 = parseFloat(model.getValue(record, 'P1_AMT') || 0);
const AMT2 = parseFloat(model.getValue(record, 'P2_AMT') || 0);
if(isNaN(P1_AMT) || isNaN(P2_AMT)){
return 'error';
} else {
return (AMT1 + AMT2);
}
}
};
console.log(options);
return options;
}
George