ONEVENT |
"Onevent" allows you to execute a process after a given event for any field or for several screens.
[GLOBAL|LOCAL] Onevent event instructions
|
Element |
Description |
Restrictions |
|
event |
One of the events defined below |
|
|
instructions |
logical_expression |
|
# Positioning of the 2
variables required in the execution of the process
# linked to the AFTER_CHANGE event
GOBJET = 1
GPROGRAMME = FUNPACK
# After any field modification, the APRES_MODIF process will be
executed
$SAICHOI
Gosub SETBOUT
Onevent AFTER_CHANGE Gosub APRES_MODIF
Boxinp [SPK2] Using REPONSE
# Disabling of the call to the APRES_MODIF process
OneventAFTER_CHANGE
Case REPONSE
When GSTAENR: Gosub ENR_COLISAGE:
Return
When GSTAANU: Gosub ANU_COLISAGE:
Return
When GSTAFIN, GSTAESC: Return
Endcase
$APRES_MODIF
Gosub SETBOUT
Return
# Running a function after
selecting the menu from the HTML page
Global Onevent ITM_MENU
Call MENU From EXEFNC
"Onevent" allows you to execute a process according to an event - for any field or for several screens. For example, you will use the Onevent AFTER_CHANGE instruction rather than an action on an AM_zone field when you want the process to be applied to all fields.
The possible events are listed below:
|
Events |
Context |
|
BEFORE_AREA |
Before displaying each field |
|
INIT_AREA |
Before initializing each field |
|
BEFORE_INPUT |
Before entering each field |
|
CONTROL |
After entering each field |
|
AFTER_AREA |
After entering a field when the control is valid |
|
AFTER_CHANGE |
After modifying a field when the control is valid |
|
ITM_MENU |
Selecting a function from the HTML page |
To disable the call of a process for a given event, use the Onevent instruction followed by the event without another parameter.
To disable the process call for any event, use the Onevent instruction without another parameter.
You may call one process for several events. In this case, you will have one Onevent instruction per event.
For all events, except for AFTER_CHANGE, the process will be called for any field, if there is not already one action for the same event on the field. For example, a process for the BEFORE_INPUT event is performed on a field, if it has no AS_zone before-entry action.
For the AFTER_CHANGE event, the process will be performed after the AM_zone after_modif action defined on the field.
For the AFTER_CHANGE event, 2 variables are to be positioned:
· GOBJET = 1
· GPROGRAMME = Name of the process that contains the Onevent instruction
For the AFTER_CHANGE event, the process called in the Onevent instruction must have APRES_MODIF for a name.
|
Error |
Description |
|
|
|