Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Please ask technical questions in the appropriate category. Thank you!

Interactive Grid: Selection Change error on selectedRecords.length

AnnelizeFApr 15 2024 — edited Apr 15 2024

Using APEX 21.1 in the cloud, but error replicated on 23.2.4

In my example app/page: https://apex.oracle.com/pls/apex/r/af_plays/af-plays/interactive-grid

DEMO | demo1234 | Menu > Interactive Grid (Page 2)

I have an interactive grid with one dynamic action:

  • Selection Change
  • True > Set Value using a Javascript Expression to set a page item to the primary key of the region. P2_DEPTNO
  • True > Refresh the Interactive Report based on the above value
this.data.selectedRecords.length != 1 ? '': 
this.data.model.getValue( this.data.selectedRecords[0], "DEPTNO")

This works perfectly fine, with no JS errors.

However, as soon as I try to edit a row on the IG Departments, I get the following JS error in the console:

interactive-grid?session=102475802144694:305 Uncaught TypeError: Cannot read properties of undefined (reading 'length')

This is confusing, since P2_DEPTNO has been correctly set and the Employees IR has been correctly retrieved.

Does anyone have some insight, please. (Please note, I do not want two Interactive Grids with a master/detail relationship)

Thank you

Annelize

This post has been answered by Karel Ekema on Apr 15 2024
Jump to Answer
Comments
Post Details
Added on Apr 15 2024
3 comments
84 views