Skip to Main Content

Info

Master-detail combinations of Interactive Grids have a one-to-many relationship, when defined in Apex using the "Master Region" option.
So if you select more than 1 row in the master IG, the detail IG will show "Select 1 row in the master region" instead of all the detail rows for all the selected master rows.

The solution below fixes this. Nothing new, I copied this from a number of sources.
But as usual I could not find a clean and easy example anywhere, so here's my attempt :-)

The idea here is that we do not set the "Master Region" for the "Emp IG - multiple" region, but instead fill a page item "P1177_DEPT_ID_SELECTED" with all the DEPT rows that are selected, and then use that in the Where Clause.
I have disabled all the add/update/delete options for the "Emp IG - multiple" region in this example, but those will work fine using this method.

Note: The dynamic action event "Selection Change [Interactive Grid]" doesn't always do what I expect it to.
For example in Master-Detail situations, when you edit data in a Master row it does not always trigger - so be aware of that possible hiccup.

Dept IG

Dept Items

Emp IG - standard

Emp IG - multiple

Code

Region

Identification
Sequence
Title
Type
Source
Source Type
Table Name

Item

Identification
Sequence
Name
Display As
User Interface
Region
Read Only
Read Only Condition Type

Item

Identification
Sequence
Name
Display As
User Interface
Region
Read Only
Read Only Condition Type

Region

Identification
Sequence
Title
Type
Source
Source Type
Table Name
Master Detail
Master Region

Region

Identification
Sequence
Title
Type
Source
Source Type
Table Name
Where Clause
Page Items to Submit

Dynamic Action

Identification
Name
Execution Options
Sequence
When
Event
Selection Type
Region
Advanced
Event Scope
True Action
Identification
Action
Settings
Code
Execution Options
Sequence
Fire On Initialization
True Action
Identification
Action
Execution Options
Sequence
Fire On Initialization
Affected Elements
Selection Type
Region