A script-enabled browser is required for this page to function properly.

On-Column-Security Trigger

Description

Fires when Oracle Forms would normally enforce column-level security for each block that has the Enforce Column Security block property set On.

By default, Oracle Forms enforces column security by querying the database to determine the base table columns to which the current form operator has update privileges. For columns to which the operator does not have update privileges, Oracle Forms makes the corresponding base table items in the form non-updateable by setting the Update Allowed item property Off dynamically. Oracle Forms performs this operation at form startup, processing each block in sequence.

Definition Level form, block

Legal Commands

SELECT statements, PL/SQL, unrestricted Built-ins

Enter Query Mode no

Usage Notes

To perform the default processing from this trigger, call the ENFORCE_COLUMN_SECURITY Built-in.

On Failure

no effect

On-Column-Security Trigger Examples

Example

The following example sets salary and commission text items in the current block to disabled and non-updateable, unless the SUPERUSER role is enabled. Only users with the user-defined SUPERUSER role can change these number fields.

DECLARE
itm_id Item;
on_or_off NUMBER;
BEGIN
IF NOT role_is_set('SUPERUSER') THEN
on_or_off := PROPERTY_OFF;
ELSE
on_or_off := PROPERTY_ON;
END IF;
itm_id := Find_Item('Emp.Sal');
Set_Item_Property(itm_id,ENABLED,on_or_off);
Set_Item_Property(itm_id,UPDATEABLE,on_or_off);
itm_id := Find_Item('Emp.Comm');
Set_Item_Property(itm_id,ENABLED,on_or_off);
Set_Item_Property(itm_id,UPDATEABLE,on_or_off);

IF form_fatal OR form_failure THEN
raise form_trigger_failure;
END IF;
END;  

ENFORCE_COLUMN_SECURITY Built-in