Skip to main content

Oracle APEX: Linking Master–Detail Regions Using Column Links



Introduction

Oracle Application Express (Oracle APEX) is a low-code development platform built on top of Oracle Database. It enables developers to build data-driven application using minimal code and leveraging the full power of Oracle SQL and PL/SQL. APEX is widely adopted in enterprise environments for building dashboards and workflow applications.

One of the most common UI patterns in database applications is the Master-Detail layout a page where selecting a row in a "master" list dynamically loads related records in a "detail" section. For example, selecting a Service Request in a list might load all associated Work Orders below it. This pattern eliminates the need for separate pages and gives users a seamless, real-time experience.

Oracle APEX supports this pattern through a combination of column links, hidden page items, and partial-page refresh (Dynamic Actions).

This article discuss how to implement it  from creating the hidden item to configuring the column hyperlink and writing the detail query.

 Overview

This guide describes how to configure a Master-Detail page in Oracle APEX so that clicking a Service Request ID column of the master report dynamically refreshes the associated detail region. The approach uses a column link to pass the selected value into a hidden page item, which the detail query then uses as a bind variable to filter its results.

Prerequisites

Before following this make sure you have the following in place:

  An existing APEX application with at least one page

   A Master region already created an Interactive Grid that displays a list of records (e.g., Service Requests)

  A Detail region on the same page an Interactive Grid  that will display related child records (e.g., Work Orders)

   Both regions query the same Oracle Database schema, with a parent-child relationship between tables ( joined on SER_REQ_ID)

   Developer access to App Builder for the application

Figure 1 – Master and Detail Region

How It Works: The Core Concept

The Master-Detail link works through a three-part chain:

1. Hidden Page Item: Acts as a shared variable between the master and detail regions. When a user clicks a row in the master report, APEX stores the selected value (e.g., a Service Request ID) in this hidden item.

2. Column Link: A hyperlink configured on a column in the master report. When clicked, it submits a partial page request, sets the hidden item value, and triggers a refresh of the detail region — all without a full page reload.

3. Bind Variable in Detail Query: The detail region's SQL query uses the hidden page item as a bind variable (e.g., :P398_SER_REQ_ID). Each time the hidden item changes, APEX re-executes the detail query and refreshes the results.

Together, these three components create a dynamic, interactive Master-Detail experience entirely within a single APEX page.

 Step: 1 – Open Page Designer

1.  Navigate to Oracle APEX → App Builder → Your Application → Pages.

2.  Open the page that contains your Master and Detail Region.

3.  The Master and Detail region is Report or Interactive Grid.

 

Figure 2 – Select Title and Type for Master and Detail Region

Step: 2 – Create the Hidden Page Item

A hidden page item acts as the communication bridge between the master and detail regions. When a user clicks a row in the master report, APEX stores the selected value in this item, and the detail query reads it via a bind variable.

1. In Page Designer, right-click on the Content Body in the layout canvas and select Create Page Item

 

Figure 3 – Create Page Item

 2.  Set the item properties as follows:

Name: P398_SER_REQ_ID

Type:   Hidden

Value Protected:  No

Note: The item name must follow the convention P{page_number}_{ITEM_NAME}. Since this page is Page 398, the item is named P398_SER_REQ_ID. Setting Value Protected to No allows the column link to pass a value into it at runtime.

3. Click Save to confirm the new page item.

Step: 3Select the Target Column

1.  In Page Designer, click on the Master Region in the layout .

2.  Under Columns, select the SER_REQ_ID column — this is the column users will click to load the associated detail data.

 

 Figure 4 – Selecting the SER_REQ_ID column in the Columns panel

Step: 4 Configure the Column as a Hyperlink

1. With SER_REQ_ID selected, open the Property Editor panel.

2. Expand Column Formatting → Link.

3. Configure the link properties as shown in the table below.

Property

Value

Target

Page in this Application

Page

398  (the current l page)

Set Items

P398_SER_REQ_ID

Values

#SER_REQ_ID#

Figure 5 – Link settings in Page Designer

Note: #SER_REQ_ID# is an APEX substitution string that resolves to the value in the clicked row at runtime. It passes the selected Service Request ID into the hidden page item P398_SER_REQ_ID, which the detail query references via a bind variable (:P398_SER_REQ_ID).

Step: 5 – Update the Detail Region Query 

Confirm that the detail region’s SQL source references the page item P398_SER_REQ_ID as a bind variable. The relevant filter conditions should read:

Query Where Clause:

Example: WHERE vsm.ser_req_id = :P398_SER_REQ_ID

 When a user clicks a Service Request ID in the master report, APEX sets P398_SER_REQ_ID to the selected value and submits a partial-page refresh on the detail region. The query then returns only the work orders for that request.

Step: 6 – Test the Master Detail Link

1. In App Builder, click Save and then Run Page to launch the application in a new tab.

2. In the master report, click any Service Request ID link.

3. Confirm that the detail region immediately refreshes to display only the work orders associated with the selected request.

4. Click a different Service Request ID and confirm the detail region updates accordingly.

 
Figure 6 – Master-Detail page in action after selecting a Service Request

Conclusion

The Oracle APEX Master-Detail link built using a hidden page item, a column link, and a bind variable in the detail query is a powerful and efficient way to create interactive, data-driven pages.
The same approach can be extended to more advanced scenarios:
   Multiple detail regions refreshed by the same master click
This scenario is an important step in building professional APEX applications.

References
  Oracle APEX Documentation -             https://docs.oracle.com/en/database/oracle/apex/
  Oracle APEX Community Forum - https://apex.oracle.com/forum

 

Comments

Popular posts from this blog

Oracle EBS R12 General Ledger (GL) Module – Practical SQL Queries

Introduction Oracle E-Business Suite (EBS) R12 General Ledger (GL) is the core Financial module in Oracle EBS R12. It is used to manage journal entries, accounting periods, balances, and financial reporting. The GL module integrates with Payables (AP), Receivables (AR), Fixed Assets (FA), Purchasing (PO), and Inventory (INV). The main purpose of a general ledger system is to record financial activity of a company and to produce financial and management reports to help the organization make decisions. Below are real-world SQL queries commonly used.   1) View configured Ledgers      Purpose: Fetch Ledger Configuration Details SELECT       ledger_id,      name  AS   ledger_name ,    short_name ,   currency_code FROM     gl_ledgers ORDER BY     ledger_id ;   2) Ledger Information Query Purpose: Fetch Ledger Configuration Details SELECT     gl.name   ...

Exploring AI in Oracle APEX 26.1

Artificial Intelligence (AI) is transforming the way organizations and developers work. Businesses and professionals are increasingly adopting AI tools to improve productivity, automate processes, and build smarter applications. Oracle APEX introduces a significant evolution in application development by integrating governed Generative AI capabilities directly into the low-code platform. This enables developers to build intelligent, conversational applications while maintaining enterprise-grade security and control. In this article we explore AI capabilities in Oracle APEX 26.1 What is AI Agents AI Agents can be created to reason over user requests and take actions through approved AI Tools. Each tool exposes a specific application capability the agent is allowed to invoke, such as retrieving data, running server-side PL/SQL, or executing client-side JavaScript. APEX manages the execution flow by preparing context, dispatching tool calls, executing tools, handling results, and...

Oracle R12 Inventory Configuration: Key points to Avoid Mistakes

Most Oracle ERP R12 inventory problems are not system failures they are process and configuration failures. The same categories of mistakes surface repeatedly across implementations: Focusing on master data control, disciplined transactions, proper OU setup, and strong internal controls prevents operational and financial discrepancies.   This article walks through the four most critical areas where Oracle R12 inventory implementations go wrong, explains why each mistake is costly, and provides recommendations to prevent them. Each section includes the relevant navigation path and configuration screenshots for hands-on reference   1.       Improper Item Master Configuration in Oracle R12   Oracle E‑Business Suite R12 , the Item Master Configuration serves as the foundation of the Inventory module. Two critical components under this configuration umbrella are: Define Master Item Setup Define Item Status Both setups control how items ...