- Overview
This Document will Explain How to Insert a new Record into an Interactive Grid using Java Scripts.
- Technologies and Tools Used
The following technology has been used to achieve the same.
JAVASRIPT
Oracle Apex 22.2
- Use Case
It will help us to create or Insert a new Record into an Interactive Grid using Java Scripts
- Architecture.
Step 1: Create interactive grid.
Step 2: Create a New Input Region .
Step 3: Create a Static ID for Interactive Grid.
Step 4: Create Function and paste it in Function and Global variable Declaration Section.
JavaScript Query to insert Record in Interactive Grid.
function addToIg(){
//interactive grid Static ID
var $widget = apex.region(‘IGJS’).widget();
var $grid =$widget.interactiveGrid(‘getViews’,’grid’);
var $model =$grid.model;
var vname = $v(‘P1_NAME’);
//insert a New Record
var newRecordID = $model.insertNewRecord();
//get the New Record
var $newRecord = $model.getRecord(newRecordID);
//Update Record values
$model.setValue($newRecord,’NAME’,vname);
}
Step 5: Create Dynamic action .
Step 6 :Save the Changes.
- Out Put