The When-Timer-Expired trigger fires when a timer you have previously created in your form, expires.
For example, you create a timer in the when-button-pressed trigger of a button, like this:
one_minute NUMBER(5) := 60000;
timer_id := CREATE_TIMER('emp_timer', one_minute, NO_REPEAT);
60 seconds after the user presses the button, the When-Timer-Expired will fire, and its code will be executed.
When you create more than one timer, you need to check which of your timers expired, because the same trigger will fire, no matter which timer expired. You can use the GET_APPLICATION_PRPERTY built-in for that purpose.
Something like this:
if get_application_property(TIMER_NAME) = 'EMP_TIMER' then
<pre>if get_application_property(TIMER_NAME) = 'EMP_TIMER' then
message('timer EMP_TIMER expired');
-- Do something else...