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.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"page_id": "<page_id>",
"master_region_name": "<master_region_name>",
"master_sql": "<master_sql>",
"detail_region_name": "<detail_region_name>",
"detail_sql": "<detail_sql>",
"link_column": "<link_column>",
"page_item_name": "<page_item_name>"
},
"name": "apex_add_master_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 |