Skip to main content

Posts

Interactive Grid Tips (Part-1)

Selection Toolbar Events Validation Styling Advanced Selection 1 Get Selected Row Primary Key Return selected row PK values to a page item. Two approaches depending on APEX version. Selection APEX 24.2+ Before 24.x Copy // Initialization JavaScript Function function (options) { options.defaultGridViewOptions = { selectionStateItem: "P22_SELECTED_IDS" }; return options; } Copy var ig$ = apex.region( "EMP" ).call( "getViews" , "grid" ); var model = ig$.model; var selectedIds = []; ig$.view$.grid( "getSelectedRecords" ).forEach( function (rec) { selectedIds.push(model.getValue(rec, "EMPNO" )); }); $s ( "P22_SELECTED_IDS" , ...
Recent posts

Dynamic Column Labels in Oracle APEX Interactive Grid Using Page Items

Dynamic Column Labels in Oracle APEX Interactive Grid Using Page Items Oracle APEX / JavaScript  ·  Interactive Grid When building data-driven applications in Oracle APEX, column headers sometimes need to reflect dynamic labels rather than hardcoded ones. This post walks through generating column names from a page item value. The Requirement The goal was straightforward: an Interactive Grid whose column headers are generated dynamically based on a page item, updating both on page load and whenever the user changes the item value manually. The page item P24_LABEL_ITEM holds a range string in this format: RESULT1-RESULT5 This means the grid columns should be labeled RESULT1,RESULT2, RESULT3 ... RESULT5 sequentially — without any hardcoding in the region or column settings. The JavaScript Solution Place the following code under Execute when Page Loads . The same block can be reused inside a Dynamic Action triggered on...

Oracle APEX Calendar Region - Beyond the Basics

This article explains how to build a complete Internal Meeting Scheduler using the APEX Calendar with dynamic UI behavior, registration tracking, and strong business validations. . Oracle APEX PL/SQL JavaScript Calendar Region Table of Contents Overview & Features Step 1 — Table Design Step 2 — Calendar Page Setup Step 3 — Calendar Attribute Mapping Step 4 — Filter Control Step 5 — Calendar Customization Step 6 — Meeting Details Popup Step 7 — Registration Handling Step 8 — Add New Meeting Step 9 — Save Meeting Logic Step 10 — Register Button Action Step 11 — Department-Based Styling Step 12 — Business Validations Overview This solution provides a structured and interactive way to manage internal meetings using Oracle APEX. Here are the key capabilities it offers: ...

Building a Custom OTP Input Plugin in Oracle APEX

Modern applications rely on One-Time Password (OTP) verification for secure authentication. These inputs are typically designed as multiple input boxes, each accepting a single character, providing a structured and user-friendly experience. Oracle APEX does not provide a native OTP input component. This article demonstrates how to build a fully configurable OTP Input Item Plugin from scratch, tested on APEX 24.2. Overview Configurable number of input boxes (1 to 12) Customizable size and colors per instance Supports numeric-only or alphanumeric input modes Auto-advance to next box after each entry Backspace moves back and clears the previous box Arrow key navigation between boxes Paste distributes characters across all boxes automatically Blur validation — empty boxes turn red when user leaves the component Page submit validation — blocks form submission if any box is empty Plugin Creation Navigation: Shared Components → Plug-ins → Create ...

Dynamic LOV Selection Based on Item - Oracle APEX

In modern business applications, role-based input restrictions are common. For example: Certain users can select only a limited number of options in multi-select fields. Others have no restriction. Sometimes, selection depends on another field value, like a designation. Implementing such dynamic validations in Oracle APEX can be done efficiently using JavaScript functions combined with Dynamic Actions, keeping logic reusable and maintainable. Key Components Global Validation Function: A single JavaScript function that validates any multi-select LOV based on a controlling field (e.g., designation). Dynamic Action on LOV Items: Executes the validation function whenever a user changes selection. Safety Dynamic Action on Controlling Field: Clears dependent LOVs if the controlling value changes to prevent invalid data. Benefits: Centralized and reusable logic...

Dynamic Enable/Disable Quick Picks Based on Item in APEX

Oracle APEX items allow Quick Picks, but they are usually static. In real-world business scenarios, we often need: Quick Picks generated dynamically Quick Picks styled for better UI Quick Picks controlled based on another item’s value Enable/Disable logic driven by business rules In this article, I’ll explain how I implemented dynamic quick picks for one date item based on another date item. 🎯 Scenario We have two Date Pickers: P5_DATE1 P5_DATE2 For P5_DATE2, I created two custom quick picks: 1️ Current Month – 1st date 2️ Next Month – 1st date 🧩 Business Logic Based on the value selected in P5_DATE1: If user selects 1st day of current month ✅ Enable "Current Month – 1st" ❌ Disable "Next Month – 1st" If user selects any other date ❌ Disable "Current Month – 1st" ✅ Enable "Next Month – 1st" Step 1: Add Custom Quick Picks in DATE2 (Post Text) In P5_DATE2 → Post Text: <span class="apex-quick-picks custom-quick-picks">     <a...