Oracle Apex 19.1 - Create Switch Example

This example shows you, how to create Switch in Oracle Apex version 19.1. We should create the switches for page items that ask the user for Yes or No kind of values such as, the employee is active Yes/No, etc.

In the below example, I will create the Switch for a field ACTIVE_CUSTOMER to show the Yes/No and to store Y/N values. Follow these steps:

Create a Switch in Oracle Apex Example

In Oracle Apex page designer, select or create a new page item and change its type to Switch and set the following properties:

Settings:

  • Settings: Custom
  • On Value: Y
  • On Label: Yes
  • Off Value: N
  • Off Label: No

Below is the screenshot of the above settings:

Oracle Apex Switch settings.

As per the above settings, it will store the value Y for Yes and N for No.

Save the changes and run the page and you will have the following output:

Oracle Apex Switch.

Related tutorials:

Vinish Kapoor
Vinish Kapoor

Vinish Kapoor is a seasoned software development professional and a fervent enthusiast of artificial intelligence (AI). His impressive career spans over 20 years, marked by a relentless pursuit of innovation and excellence in the field of information technology. As an Oracle ACE, Vinish has distinguished himself as a leading expert in Oracle technologies, a title awarded to individuals who have demonstrated their deep commitment, leadership, and expertise in the Oracle community.