Press "Enter" to skip to content

Oracle Apex 19.1 – Create Checkbox of Yes/No Type

This Oracle Apex tutorial shows you, how to create a checkbox of Yes/No type. To demonstrate this example I am using Oracle Apex version 19.1.

Mostly, we used to create checkboxes to indicate and store flag values, such as Y/N for Yes/No, T/F for True/False, etc. Similarly, for this example, I will create a checkbox for a field ACTIVE_CUSTOMER having data type Varchar2 size 1, to store Y if checkbox checked and to store N if unchecked.

Create Checkbox in Oracle Apex to Store Y/N for Yes/No Values

In Oracle Apex page designer, select or create a new page item for a flag field for which you want to create a checkbox. Then change the type of the item as Checkbox and set the following property settings:

  • Settings > Number of Columns: 1
  • List of Values > Type: Static Values
  • Display Extra Values: No
  • Static Values: Then click on the button for static values and add the values as shown in the below image:

Oracle Apex 19.1 - Create a checkbox example.

Now we have specified the checkbox checked value as Y. But what if the user will uncheck the checkbox, we need to store the value N for it. To do this follow these steps:

Do the right-click on the checkbox item and select Create Computation and set the following properties:

  • Point: After Submit
  • Computation > PL/SQL Expression: nvl(:P20_ACTIVE_CUSTOMER, 'N');

Below is the screenshot of the above settings:

Oracle Apex computation settings.

The above PL/SQL expression will execute at the time of page submit and will assign the value N if the checkbox is unchecked means the value of page item P20_ACTIVE_CUSTOMER is null.

Save the changes and run the page to test.

Related tutorials:

Have you found the answer to your question? If not, you can discuss it with me in the comments section below or join my Q&A community for developers and ask your question. It is FREE.

Vinish Kapoor


Hi, I am a full stack developer and writing about development. I document everything I learn and help thousands of people. is created, written, and maintained by me; it is built on WordPress, and hosted by Bluehost. Connect with me on Facebook, Twitter, GitHub, and get notifications for new posts.

1 Comment
Newest Most Voted
Inline Feedbacks
View all comments
10 days ago

Hi Vinish,
that was helpful. Thanks