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

When-Button-Pressed Trigger

Description

Fires when an operator selects a button, by clicking with a mouse, or using the keyboard.

Definition Level form, block, or item

Legal Commands

SELECT statements, unrestricted Built-ins, restricted Built-ins

Enter Query Mode yes

Usage Notes

Use a When-Button-Pressed trigger to perform navigation, to calculate text item values, or for other item, block, or form level functionality.

On Failure

no effect

When-Button-Pressed Trigger Example

This example executes a COMMIT_FORM if there are changes in the form.

BEGIN
IF :System.Form_Status = 'CHANGED' THEN
Commit_Form;
/*
** If the Form_Status is not back to 'QUERY'
** following a commit, then the commit was
** not successful.
*/
IF :System.Form_Status <> 'QUERY' THEN
Message('Unable to commit order to database...');
RAISE Form_Trigger_Failure;
END IF;
END IF;
END;