0
votes

Im using Oracle apex 4.2. In a master detail form, I need to calculate the total of the details rows number field (Period Value, inspected as F06)

Kindly guide me any suitable way of doing a total, when the field changes

enter image description here

1

1 Answers

0
votes

I would do something like this:

$(document).on("change", "input[name=f06]", function() {
    var n = 0;
    $("input[name=f06]").each(function() {
        n += parseInt(($(this).val() || "0").replace(/,/g, ""), 10);
    });
    $("#PX_TOTAL").val(n);
});