Interactive Grid Check data wise Grand total Show

 


Step 1:
=====

Create a Dynamic Action on this Interactive Grid region.

True Action: Execute JavaScript Code
Code: 

// Interactive Grid এর static ID সেট করুন

var gridStaticId = "your_grid_static_id"; // এখানে আপনার গ্রিডের Static ID দিন


// Price কলামের static ID সেট করুন

var priceColumnStaticId = "PRICE"; // এখানে আপনার প্রাইস কলামের Static ID দিন


var totalSum = 0;

var grid = apex.region(gridStaticId).widget().interactiveGrid("getViews", "grid");

var selectedRecords = grid.getSelectedRecords();


if (selectedRecords.length > 0) {

    selectedRecords.forEach(function(record) {

        // Price কলাম থেকে value নেয়া হচ্ছে

        var price = parseFloat(grid.model.getValue(record, priceColumnStaticId));


        // যদি price একটি সংখ্যা হয়, তবে যোগ করা হবে

        if (!isNaN(price)) {

            totalSum += price;

        }

    });

}


// P23019_SUM আইটেমে যোগফল সেট করা হচ্ছে

apex.item("P23019_SUM").setValue(totalSum.toFixed(2)); // toFixed(2) দুই দশমিক স্থান পর্যন্ত দেখানোর জন্য

Step 2:
=====

Affected Elements:

  • Selection Type: Item(s)

  • Item(s): P23019_SUM

Post a Comment

Previous Post Next Post