Skip to Main Content

Oracle Forms

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

CREATE_TIMER to clear form

696222Oct 6 2009 — edited Oct 6 2009
Ok, I've created a form in which the "customer" will enter their basic information such as address, name, phone etc....

Now if the customer walks away and does not finish the application, I need a timer that will clear the info out.

So far I've been trying the built-in CREATE_TIMER along with Clear_Form(No_Validate) on a form level WHEN_TIMER_EXPIRES trigger.


It works a little. I've tried placing the timer in a POST-CHANGE or POST-TEXT-ITEM trigger in an attempt to make the timer "re-start" every time the user fills in a field. (I will post my trigger below).
The problem(s) are as follows:
1. If someone for example fills in only one field and does not move the cursor, the timer does not start. Probably because my timer is currently in post-text-item.
2. I get an error "Attempt to create existing timer" when the timer runs a second time. Since this will be used by the general public to input their info it needs to be rather flawless in functionality, and clear out the form info AND go back to the "welcome" screen after a minute or so of inactivity.

I've just found the built-in SET_TIMER and will be looking into that. Below is my current basic timer. It's short (10 sec) for testing.
Using Oracle 9i. but my forms are 10g.
DECLARE
timer_id Timer;
one_minute NUMBER(5) := 10000;
BEGIN
timer_id := CREATE_TIMER
('emp_timer', one_minute, NO_REPEAT);
END;
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 3 2009
Added on Oct 6 2009
4 comments
19,834 views