Overview
Oracle
APEX has powerful features for building interactive dashboards and data-driven
applications.
In this article, we discuss how a Pie Chart
can pass the selected supplier value to a Hidden Page Item, which is then used
to dynamically filter an Interactive Grid and display only the relevant
records.
A
common requirement is to filter dashboard data based on user interaction with
charts.
Prerequisites
Before implementing this, ensure the
following are available.
- An
Interactive Grid region.
- A Pie Chart
region displaying Top five supplier information by QA Result.
- A Hidden
Page Item to store the selected supplier.
- A report
query that supports filtering using bind variables.
What is a Hidden Page
Item?
In Oracle APEX, a Hidden Page Item stores values that are not visible to end users but remain available during page processing, validations, computations, Dynamic Actions, and PL/SQL execution
How to Create a Hidden Page Item
1.
Log
into your APEX workspace
2.
Navigate
to the page
Step 2: Add a New
Page Item
1.
Right-click
on the Items region
2.
Select
Create Page Item
Step 3: Configure
and Save
1.
Give
the item a meaningful name
2.
Set
Type to Hidden
3.
Set
Value Protected to No
Note: Set Value Protected to No because the item value will be populated through chart navigation.
4.
Set
Default Value if needed
5.
Click
Save
How to Use Hidden Items in a Region SQL Query
Once
a Hidden Page Item is created, it can be referenced in region SQL queries using
Oracle APEX bind variable syntax:
:P440_SUPPLIER
The bind variable can then be used within the report query to
dynamically filter records based on the value selected from the Pie Chart.
Step 4: Configure
the Pie Chart
We configure the Pie Chart so that the
selected supplier value is passed to the Hidden Page Item and used to filter
the Interactive Grid.
Select the Top 5 Suppliers by Failed QA
Pie Chart region and configure the chart link as described below
1)
Type : Select
Redirect to page in this Application
Enter the Hidden Page Item: P440_SUPPLIER
b. Value
Click
the LOV icon next to Value.
&SUPPLIER.
The configuration should appear as:
|
Name |
Value |
|
P440_SUPPLIER |
&SUPPLIER. |
c. Clear
Cache
Leave
blank.
d. Action
Leave
as None.
5. Modify Main Region Report Query
AND (
:P440_SUPPLIER IS NULL
OR ab.supplier = :P440_SUPPLIER
)
Note:
- All records
are displayed when no supplier is selected.
- Only records for the
selected supplier are displayed when a pie chart segment is clicked.
6. Page Items
to Submit
In the
Interactive Grid region:
Locate Page
Items to Submit and add:
P440_SUPPLIER
7. Testing
When a user
clicks the JAMAL segment in the Pie Chart:
- The selected
supplier value (JAMAL) is passed to P440_SUPPLIER.
- The
Interactive Grid is refreshed automatically.
- The report
query applies the supplier filter.
- Only records
related to JAMAL are displayed.
1.
The user clicks a segment in the Pie
Chart.
2.
The selected supplier value is passed
to P440_SUPPLIER.
3.
Oracle APEX updates the session state
for the Hidden Item.
4.
The Interactive Grid submits the item
value and refreshes.
5.
The report query applies the bind
variable filter and displays only matching records.
Conclusion
Oracle
APEX makes it easy to build interactive dashboards by linking chart selections
with report filtering. By passing the selected Pie Chart segment value to a Hidden
Page Item and using it within the report query, developers can create dynamic
Interactive Grid reports that refresh automatically based on user selections.
This approach enhances usability, improves data exploration, and delivers a
more intuitive dashboard experience without requiring manual search or filter
entry.







Comments
Post a Comment