Built-in functions in the development of EBS form Execute_trigger
(Copyright notice, I original or translated articles for reprint, such as reprinted for Personal learning, please specify the source; otherwise please contact me, the offender must investigate)
Description
Execute_trigger to run a specified trigger.
Grammar
PROCEDURE Execute_trigger (TRIGGER_NAMEVARCHAR2);
A restricted, built-in type of program (if a user-defined trigger invokes any of the restricted built-in subroutines).
Input query mode is supported.
Parameters
TRIGGER_NAME specifies a valid user-named trigger.
Instructions for use
Because you cannot specify the scope of this built-in function, oracleforms typically starts at the bottom of the trigger and then processes it up.
If you run a built-in trigger that has a key associated with it, you should use the built-in function Do_key instead of the Execute_trigger. For example, the following example should not be used
Execute_trigger (' Key-next-item ');
should use
Do_key (' Next_item ');
restrictions on Execute_trigger
Although you can use Execute_trigger to run a built-in trigger just like a user-named trigger, this usage is not recommended, because the default failure handling behavior is entirely in accordance with a different rule, not as Oracle Forms are part of the trigger when it is invoked automatically. For example, in default processing, if the When-validate-item trigger fails, it throws an exception and stops processing of the form.
However, if the When-validate-item trigger is invoked by Execute_trigger and fails, the failure does not stop the form processing, but simply returns the variable from the built-in Execute_trigger form_ Failure set to False.
Execute_trigger Sample
/*
* * Built-in:execute_trigger
* * Example:execute a trigger Dynamicallyfrom the Pl/sql
* * Code of a menu item, depending on a menu
* * checkbox.
*/
DECLARE cur_setting VARCHAR2 (5);
Advanced_mode BOOLEAN;
BEGIN
/*
* * Check whether the ' Advanced ' menu Itemunder the
* * * ' Preferences ' submenu is checked on Ornot.
*/
Cur_setting: =get_menu_item_property (' preferences.advanced ', CHECKED);
/*
* * IF It is checked on, then Advanced_modeis Boolean
* True.
*/
Advanced_mode: = (cur_setting = ' TRUE ');
/*
* * Run the appropriate trigger from theunderlying form
**
*/
IF Advanced_mode THEN
Execute_trigger (' launch_advanced_help ');
ELSE
Execute_trigger (' launch_beginner_help ');
End IF;
End;
Personal Understanding
L Execute_trigger is more commonly used to invoke custom trigger.
L Execute_trigger calls the built-in trigger, ignores the corresponding exception, so the exception is handled after the call.
L The triggers associated with the keys should use Do_eky.
L Execute_trigger cannot specify the scope of the call trigger when called