When it comes to boolean values in the database there are many many different approaches, e.g. you can define a table column of data type number and use 1 or 0 as boolean values.
But there is much more and some of the solutions are better than others.
Over the last years me and my colleagues found using either 1/0 or Y/N as most useful solutions.
Now, if you want to visualize Boolean values in an APEX Form you most likely would like to go for a checkbox. Checked means true (1/Y), unchecked means false (0/N).
And there is the problem, APEX only knows one value for a checkbox, this is when it is checked. If the checkbox is not checked it is just NULL.
But instead of NULL we rather would like to store 0/N in the item.
So, what to do? Easy, just use the preconfigured LOV APEXLIB_BOOLEAN_Y_N or APEXLIB_BOOLEAN_1_0
ApexLib ensures, that if the checkbox is unchecked the False-Value is stored in this item (either 0 or N).

It‘s quite in here! Why not leave a response?