Oracle Forms 6i – “when timer expired”

40 pts.
Tags:
Oracle 6i
Oracle Forms
Oracle Forms 6i
When Timer Expired Trigger
I don't know the logic of "When Timer Expired" trigger in forms 6i. Can someone please explain it (with examples)?

Answer Wiki

Thanks. We'll let you know when a new response is added.

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:

DECLARE
timer_id Timer;
one_minute NUMBER(5) := 60000;
BEGIN
timer_id := CREATE_TIMER('emp_timer', one_minute, NO_REPEAT);
END;

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

if get_application_property(TIMER_NAME) = 'EMP_TIMER' then
message('timer EMP_TIMER expired');
-- Do something else...
end if;

Discuss This Question: 3  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • Stzalin
    How can I get my WHEN-TIMER-EXPIRED command to fire while a host command is executing? I actually want to allow the user to abort the host command if he clicks an "abort" button, and I figured a Timer would be the best way to do that, but it appears that no form processing can occur until the HOST command finishes executing.
    10 pointsBadges:
    report
  • Hellowasim
    Problem: -- In Forms 6i, Timer related trigger suspends working when a child form is CALLed/OPENed Problem Detail: -- Using Oracle Forms 6i.... Created timer triggers on 'Main' form. Main form is some sort of MENU where button have been placed to call/open other forms. Further I have 10 or even more forms to be called/opened from the main form. Everything works fine as far as user is on the main form (not called/opend any form from 'main' form) Problem starts when user clicks on any button and navigates to another form (I used CALL_FORM/OPEN_FORM to call/open the other forms). Is there any solution in someone's mind ? Early help will be regarded. Regards. Wasim
    10 pointsBadges:
    report
  • YOUSAFALIBS
    --put this in When New Form Instance trigger:DECLARETEM DATE;TIMER_ID TIMER;BEGIN SELECT SYSDATEINTO TEMFROM DUAL;SELECT TO_NUMBER(TO_CHAR(TEM, 'HH'))||':'||TO_NUMBER(TO_CHAR(TEM, 'MI'))||':'||TO_NUMBER(TO_CHAR(TEM, 'SS'))INTO :digi_clockFROM DUAL;TIMER_ID := CREATE_TIMER('MY_TIMER', 600, REPEAT);END; --put this in when timer expired trigger:DECLARETEM DATE;TIMER_ID TIMER;BEGINSELECT SYSDATEINTO TEMFROM DUAL;SELECT TO_NUMBER(TO_CHAR(TEM, 'HH'))||':'||TO_NUMBER(TO_CHAR(TEM, 'MI'))||':'||TO_NUMBER(TO_CHAR(TEM, 'SS'))INTO :digi_clockFROM DUAL;END;  
    80 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following