apex_add_master_detail
Create master-detail Interactive Reports on the same APEX page. Clicking a master row refreshes the detail region using a linked column.
Instructions
Create master IR + detail IR on same page. Row click in master refreshes detail.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| page_id | Yes | Page ID where both regions will live. | |
| sequence | No | Display sequence for the master region (detail gets +10). | |
| detail_sql | Yes | SQL query for the detail IR. Must reference the hidden item as a bind variable. Example: ``"SELECT * FROM TEA_BENEFICIARIOS WHERE ID_CLINICA = :P10_SELECTED_ID"`` | |
| master_sql | Yes | SQL query for the master IR. Example: ``"SELECT ID, DS_NOME FROM TEA_CLINICAS ORDER BY DS_NOME"`` | |
| link_column | Yes | Column in the master IR whose value is passed to the hidden item when a row is clicked (e.g., ``"ID"``). | |
| page_item_name | Yes | Suffix for the hidden item name — auto-prefixed with ``P{page_id}_``. The bind variable in ``detail_sql`` must match. | |
| detail_region_name | Yes | Display name of the detail IR region. | |
| master_region_name | Yes | Display name of the master IR region. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |