Rules & Checkbox Fields

By definition, checkbox fields have two values, checked and unchecked.  However in reality database technology really has three values under the covers:

  • Not Set
  • Checked
  • Unchecked

There are differences in the way that Not Set and Unchecked are handled internally, but if you adhere to the following way to set and to unset the values of a checkbox, ExtraView will handle the interal differences.

To set a value:

MY_CHECKBOX = 'Y';

To uncheck a value:

MY_CHECKBOX = 'N';

To check whether a checkbox is set:

if (MY_CHECKBOX = 'Y') { ..... };

To check whether a checkbox is not checked:

if (MY_CHECKBOX = 'Y') { ..... };