Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Null reference when trying to access row of an Interactive Grid in Oracle APEX 18

indy2005Jul 1 2019 — edited Jul 8 2019

I need to write the value of selected item in an interactive grid into session.

 

It is working, but on page startup I get this error:

 

0: Unable to get property '20' of undefined or null reference

 

I am using a "Selection Changed [Interactive Grid]' dynamic action, with a javascript action as below:

 

function setItemValue(node) { 
     $s('P3_SELECTED_REG_UID', node);
     apex
.server.process('MY_PROCESS',{ pageItems: '#P3_SELECTED_REG_UID' },{dataType: "text"});
}  

var i
, selectedIds = "", model = this.data.model; 
selectedIds
= model.getValue(this.data.selectedRecords[0], "REGISTRATION_UID");
console
.log(selectedIds);
setItemValue
(selectedIds);

 

The javascript action is set to NOT FIRE on initialization. So I don't understand why I am getting this error. The error disappears when I disable the dynamic action.

 

It all works fine, but I could do without a javascript error on page load.

Comments
Post Details
Added on Jul 1 2019
9 comments
1,604 views