0
votes

I need to set the value from popup lov column in item when (selection change (interactive grid)), but the value appears like [object Object]

This is my code:

this.data.selectedRecords.length != 1 ? '': this.data.model.getValue( 
this.data.selectedRecords[0], "DEPTNO")

How I can show the true value?

1
What do you get in the console if you put this in before that line: console.log(this.data.model.getValue( this.data.selectedRecords[0], "DEPTNO")) - Dan McGhan
this.data.selectedRecords.length != 1 ? '': console.log(this.data.model.getValue( this.data.selectedRecords[0], "DEPTNO")) , when i try with this code no value appear - jaw
No, put the line of code I gave you before the line of code you showed before. - Dan McGhan

1 Answers

0
votes
    //Use the below code in the Apex Page
    //Event: Selection Change Interactive grid
    //True Action: Javascript code


//To get the IG column values based on selection.
//EMP is the Static ID of the IG region.
    var record;
    var ig$=apex.region("EMP").widget();
    var grid=ig$.interactiveGrid("getViews","grid");
    var model= ig$.interactiveGrid("getViews","grid").model;
    var selectedRecords=apex.region("EMP").widget().interactiveGrid("getViews","grid").view$.grid 
   ("getSelectedRecords");

//Loop through the rows in IG.
    for (idx=0; idx < selectedRecords.length; idx++)
    {      
  //To show the value of modal LOV in browser console
  //EMP_NAME is the name of the IG column
  //.v is used to get the value of the object.  
      console.log(selectedRecords[idx][model.getFieldKey("EMP_NAME")].v);    
    }