O'Reilly logo

Oracle APEX Cookbook - Second Edition by Marcel Van Der Plas, Michel Van Zoest

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Reading a checkbox programmatically

In the previous recipe, we saw that we can use APEX_ITEM and APEX_APPLICATION to programmatically display and control items. We can also create and manipulate a checkbox. In this recipe, we will show you how to use the APEX_ITEM.CHECKBOX function and how to avoid problems. We will use the previous recipe and extend it with a checkbox.

A checkbox is a special kind of item on a webpage. It can either be checked or unchecked. But APEX doesn't know the unchecked state and therefore it replaces the unchecked value with null. Since APEX_APPLICATION is an array, null values will not be stored in APEX_APPLICATION. But if you try to look up the value of a certain row, you might get a no data found error.

Getting ready ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required