Get Interactive Grid selected rows value into a page item

JavaScript Expression can be written to get Interactive Grid selected rows into a page item.

Modifying or customizing Interactive Grid properties sometimes need extra effort.In my last post I mentioned how to activate “Edit” mode by default when the IG report load. Click to see last post

In the above picture I want EMPNO of all selected rows into a page Item.

To achieve follow below steps.

Step 1

  • Create a Dynamic Action “Selection Change [Interactive Grid]”
  • Select the Interactive Grid region.
  • Create Action “Execute JavaScript Code”
  • Below is the code sample
var 
model = this.data.model,
records = this.data.selectedRecords;
var sep = ",";
var temp = "";
records.forEach(record =>temp =temp + record[0]+sep);
apex.item( "P30_EMP_ID" ).setValue(temp.replace(/,\s*$/, ""));
records.forEach(record =>temp =temp + record[0]+sep);

You need the change record[0] based on your column position in the Interactive Grid.

Click On the demo

For  any query feel free to reply.

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *