Displaying Counts in APEX Navigation Menu in Oracle APEX

Introduction/ Issue:  

In Oracle APEX, it’s possible to dynamically present the number of items—such as pending modules, unread messages, or active records—next to navigation entries (e.g., “Modules [5]”). This live context helps users quickly understand the quantity or state of items without navigating further.

Why we need to do / Cause of the issue: 

User awareness: Users immediately see how many items await their attention—enhancing usability.

Avoids extra clicks: It prevents unnecessary navigation, saving time and improving workflow.

Static labels lack context: Without dynamic data, menu labels can become stale, misleading users if item counts change.

The underlying challenge is that default APEX navigation labels are static—they don’t reflect real-time counts unless explicitly configured to do so.

 

How do we solve:

A) Create an Application Item

Navigate to Shared Components → Application Items.

Click Create, and define an item such as MODULE_COUNT.

B) Set Up an Application Computation

Go to Shared Components → Application Computations.

Create a new computation:

Item: MODULE_COUNT.

Computation Point: Before Header (ensures value is set before navigation is rendered).

Computation Type: SQL Query (return single value).

Example SQL:

SELECT COUNT(*) FROM module_table WHERE …;

C) Use the Item in Navigation Menu

In Shared Components → Navigation Menu (or Lists), edit the desired menu entry.

For the Label, insert your application item substitution like so:

Modules [&MODULE_COUNT.]

This will render with the computed number, for example: Modules [12]

Optionally, for a more polished look using Universal Theme badges

Use the Badge Value attribute and enter &MODULE_COUNT..

D) Save and Test

Save your changes, then run the application.

Verify that the menu label or badge shows the real-time count.

Note: Some APEX versions may cache this value across sessions—users might see stale counts until navigation is reloaded.

Conclusion: 

By leveraging Application Items and Application Computations—set to run before header—you can dynamically calculate counts (e.g., MODULE_COUNT) and seamlessly insert them into navigation labels or badges. This method enhances user awareness and creates a more interactive, dataaware UI. Just be mindful of caching nuances to ensure the counts remain current.

Recent Posts