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!

APEX 19.2 - Master/Detail Interactive Grids

John_KMar 11 2020 — edited Apr 28 2020

Has anyone got a master-detail interactive grid working properly? Take a really simple test case I have, which is representative of my real-world issue.

Two tables:

MASTER(id number generated always as identity, val varchar2(1000));

DETAIL(id number generated always as identity, master_id number, val varchar2(1000));

PK's and FK's also defined.

So I create two IG's, with the detail one having a parent of MASTER and the MASTER_ID column set to MASTER.ID. I also set the primary key on master.

But the way the two interact seems to be littered with problems depending on the steps taken.

1) If I uncheck "Add Row if Empty" on both then...

a) Add the row in master, don't save, then add the row in detail. Now save. I get "ORA-06502: PL/SQL: numeric or value error: character to number conversion error".

b) Ok - so I'll save first after adding the master, then add the detail and save. Now I get "Ajax call returned server error ORA-01403: no data found for ."

2) If I check "Add Row if Empty" on both then...

a) Edit the row in master, don't save, then edit the row in detail. Now save. I get "ORA-06502: PL/SQL: numeric or value error: character to number conversion error".

b) Save after adding the master, then add the detail and save - it now works.

OK - I can kind of understand (a) on both accounts - although surely the process should, at the point of saving:

1) Save the master record

2) Requery that to pick up any generated/trigger changed columns

3) Push those values into the detail

It seems to do that somewhat, but only if you save first, and only if you check "Add Row if Empty".

As it stands, it seems there is no way to prevent a user from seeing an error message if they do something slightly out of sequence.

Test case here: https://apex.oracle.com/pls/apex/f?p=43733:1

demo/demodemo

Am I being stupid here, or is this fundamentally broke?

Comments
Post Details
Added on Mar 11 2020
9 comments
2,272 views