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!

Interactive grid - Form with grid

partlycloudyNov 6 2018 — edited Nov 13 2018

APEX 18.2

I have a page with a form on a table. The page also has a Interactive Grid on a detail table linked to the master table. I see a similar pattern in the Sample Interactive Grid app Editing > Form With Grid but I'm not sure I follow. Specifically

1. When the form region is in new mode i.e. P1_MASTER_ID is null, the detail IG Save will fail because the master record doesn't exist yet.

2. Should this be a two-step process i.e. a Save button on the master form to create the row, refresh back and then allow the detail grid to be updated? Seems klunky

3. Or should the IG be based on an APEX collection with custom PL/SQL code to persist the data for the IG Save button and then another post-submit process to copy the data from the collection to the real detail table after the DML process creates the master record. But this presents a challenge for edit mode when master/detail data is available. The IG query would need to be collection UNION detail or perhaps 2 IG regions, one based on a collection (P1_MASTER_ID is null), other based on the detail table (P1_MASTER_ID is not null)

Any ideas appreciated.

Thanks

Comments
Post Details
Added on Nov 6 2018
4 comments
517 views