A call to the CHECKBOX_CHECKED function returns a BOOLEAN value indicating the state of the given check box. If the item is not a check box, Oracle Forms returns the following error:
FRM-41038: Item <item_name> is not a check box.Built-in Type unrestricted function
Returns BOOLEAN
Enter Query Mode yes
A call to GET_ITEM_PROPERTY(item_name, ITEM_TYPE) can be used to verify the item type before calling CHECKBOX_CHECKED.
To set the value of a check box programmatically, assign a valid value to the check box using standard bind variable syntax.
The CHECKBOX_CHECKED Built-in returns a BOOLEAN value regarding the state of the given check box. It does not return the actual value of the check box nor does it return the value you might have indicated for the Mapping of Other Values property.
/*
** Built-in: CHECKBOX_CHECKED
** Example: Sets the query case-sensitivity of the item
** whose name is passed as an argument, depending
** on an indicator checkbox item.
*/
PROCEDURE Set_Case_Sensitivity( it_name VARCHAR2) IS
indicator_name VARCHAR2(80) := 'control.case_indicator';
it_id Item;
BEGIN
it_id := Find_Item(it_name);
IF Checkbox_Checked(indicator_name) THEN
/*
** Set the item whose name was passed in to query case-
** sensitively (i.e., Case Insensitive is False)
*/
Set_Item_Property(it_id, CASE_INSENSITIVE_QUERY,
PROPERTY_FALSE );
ELSE
/*
** Set the item whose name was passed in to query case-
** insensitively (ie Case Insensitive True)
*/
Set_Item_Property(it_id,CASE_INSENSITIVE_QUERY,PROPERTY_TRUE);
END IF;
END;