Overview

The new combo box in Oracle APEX 23.2 introduces exciting possibilities for building dynamic and user-friendly applications. They are akin to the classic select list and Popup LOV, but they offer a range of unique features that add versatility and functionality to your Oracle APEX applications

Technologies and Tools Used

The following technologies has been used to achieve the same:

  • Oracle APEX
  • PL/SQL

Use Case

  1. A combo box is same as select list but we can add the values manually by the user.
  2. A combo box can improve data entry accuracy by providing a list of valid options, thus limiting the possibility of incorrect entries.
  3. It also allows for faster data entry as users can select from existing options instead of typing in values.
  4. The combo box operates dynamically, visually adapting as users interact with it. It offers various options that users can select, enabling single or multiple selections.
  5. A significant improvement in combo boxes is the ability to use separators to separate values or tags. These separators can be customized, allowing developers to choose symbols or characters to indicate separations. This enhancement ensures a more intuitive user experience, especially when dealing with tags or lists.
  6. With the combo box, users can effortlessly select multiple values without the need to reopen the list, even when filtering.
  7. One of the most notable features is the ability to identify manual entries. This functionality allows values that are not part of the data set to be sent to the server for further processing, such as adding them to a lookup table or an external data set. Users can enter values processed separately from the data set, enhancing data management capabilities.

Architecture 

Step1: Create Region With the name of COMBO and create the following page items & Buttons

 

Page Items

 

Type

 

P2_COMBOBOX_ONE

 

COMBOBOX

P2_COMBOBOX_MANY COMBOBOX
P2_MANUAL_ENTRIES Hidden
ADD

Button

 

Step 2: Create a process for manually entering the values in the combo box

DECLARE

L_NEW_TAG_ID VARCHAR2(20);

BEGIN

FOR L_NEW_TAG IN (

SELECT

COLUMN_VALUE

FROM

APEX_STRING.SPLIT(:P2_MANUAL_ENTRIES, ‘:’)

) LOOP

INSERT INTO CUSTOMERS1(FIRSTNAME) VALUES (L_NEW_TAG.COLUMN_VALUE) RETURNING FIRSTNAME INTO L_NEW_TAG_ID;

:P2_COMBOBOX_MANY := :P2_COMBOBOX_MANY || CASE WHEN :P2_COMBOBOX_MANY IS NOT NULL

THEN

‘:’

END || L_NEW_TAG_ID;

END

LOOP;

 

:P2_MANUAL_ENTRIES := NULL;

END;

Conclusion 

The introduction of combo boxes in Oracle APEX brings dynamism and user-friendliness to your applications. With dynamic behavior, custom separators, multi-select options, and support for various features, the combo box is a valuable addition to your development toolkit. Whether you’re dealing with tags, lists of values, or user inputs, the combo box offers an enhanced and flexible solution.

 Screenshots

Combo box one where it can store only one value

 

 

While in Combo box many go to the settings and on the multiple values as well as multiple selection for  choosing multiple values

 

Create a  page item and make it as a hidden page item and in combo box many add the page item in the manual entries item

 

In Combo box many we Can select multiple values

 

Manually adding a name that is not in the data and click the add button

 

The Manually entered name has been added to the data

Recent Posts

Start typing and press Enter to search