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

About Using SYSTEM.MODE to Determine the Current Mode

Setting the Fire in Enter Query Mode property to Yes causes a trigger to fire in both Enter Query mode and in Normal mode. For a trigger to perform different functions depending on whether the form is in Normal mode or Enter Query mode use the SYSTEM.MODE system variable to determine the current mode.

For example, you might want a trigger to take one set of actions if the form is in Enter Query mode, and a different set of actions if it is Normal mode:

/* Trigger with Fire in Enter Query Mode property to Yes: */
IF :System.Mode = 'ENTER-QUERY' THEN  -- execute these statements ELSE  
-- execute these other statements
Similarly, you can write a trigger that fires only if Oracle Forms is in Enter Query mode:
/* Trigger with Fire in Query Mode property to Yes: */
IF :System.Mode = 'ENTER-QUERY' THEN  -- execute these statements
END IF;

Note: The SYSTEM.MODE system variable reports on the mode of the current block. This means, for example, that you cannot expect SYSTEM.MODE to be accurate when you read its status in a trigger attached to a control block, such as a When-Button-Pressed trigger. Because a control block is not based on a database table, it can never be placed in Enter Query mode.


Fire in Enter-Query Mode

SYSTEM.MODE examples

Creating a trigger that fires in Enter Query mode

About Built-ins that are not allowed in Enter Query mode

About defining triggers to fire in Enter Query mode