Oracle Forms provides Built-in system variables that keep track of runtime status conditions during a Oracle Forms Runform session. You can read the values of these variables in any form trigger or user-named subprogram. Here is an example of checking the value of the system variable System.Mode:
IF :System.Mode = 'ENTER-QUERY' THEN
IF NOT Show_Lov('dept_lov') then
RAISE Form_Trigger_Failure;