When-Timer-Expired [message #540651] |
Wed, 25 January 2012 03:45 |
|
jixx
Messages: 5 Registered: January 2012
|
Junior Member |
|
|
Hello,
I'm having a problem with the When-timer-Expired trigger.
I am creating a timer on the On-Error trigger of the block.
in the when-timer-expired :message(11);exit_form(no_validate);
If i run the program program for the first time,message 11 doesnt show thus it doesnt fire the when-timer-expired trigger. But if i logout from application server and enter all over again,the when-timer-expired works !
|
|
|
|
Re: When-Timer-Expired [message #540681 is a reply to message #540651] |
Wed, 25 January 2012 05:51 |
|
jixx
Messages: 5 Registered: January 2012
|
Junior Member |
|
|
1- IF NVL(:PARAMETER.P_CALLED,0) <> 0
THEN
CALL_TIMER;
2- PROCEDURE CALL_TIMER IS
v_timer TIMER;
name1 varchar2(20);
Begin
IF get_application_property(TIMER_NAME) ='MYTIMER'
THEN Delete_Timer('MYTIMER');clear_message;
ELSIF get_application_property(TIMER_NAME) ='EXITFORM'
THEN Delete_Timer('EXITFORM');clear_message;
ELSE NULL;
END IF;
v_timer := Create_Timer('MYTIMER', 1, NO_REPEAT);message(55);message(55);
End;
3-DECLARE
V_NAME VARCHAR2(20) := NULL;
BEGIN
message('expire');message('expire');
IF get_application_property(TIMER_NAME) ='MYTIMER'
THEN Delete_Timer('MYTIMER');clear_message;
ELSIF get_application_property(TIMER_NAME) ='EXITFORM'
THEN Delete_Timer('EXITFORM');clear_message;
ELSE NULL;
END IF;
:GLOBAL.MANISS1 := 0;
:GLOBAL.INVMATCH1 := 0;
:GLOBAL.MANISS := 0;
:GLOBAL.INVMATCH := 0;
EXIT_FORM(NO_VALIDATE);
END;
Please take into consideration that here a form is calling another form.It is inserting data in the background and i am using global parameters to see if there is any errors for rollback to occur for both forms.
CM: added [code] tags
[Updated on: Wed, 25 January 2012 08:03] by Moderator Report message to a moderator
|
|
|
|
|
|
Re: When-Timer-Expired [message #540739 is a reply to message #540735] |
Wed, 25 January 2012 08:43 |
Gogetter
Messages: 39 Registered: December 2009 Location: Cologne Germany
|
Member |
|
|
Hi,
I create a form with
1. PROCEDURE CALL_TIMER
2. Button With When-Button-Pressd Trigger which is callin Call_Timer
3. WHEN-TIMER-EXPIRED on Form Level with your code
When pressing button, anything goes fine.
I replaced "Exit Form" with a message - anything fine.
[Updated on: Wed, 25 January 2012 08:43] Report message to a moderator
|
|
|
|
Re: When-Timer-Expired [message #540746 is a reply to message #540741] |
Wed, 25 January 2012 09:02 |
Gogetter
Messages: 39 Registered: December 2009 Location: Cologne Germany
|
Member |
|
|
okay,
I added a text item (Number) with on-error-tigger on item level and entered a char. Error raise, and exit form works.
I moved the on-error-trigger to block level, and exit form works fine here too.
I think there are other circumstances in your form which may block the exit or raise other errors?
Will read your answer tomorrow
Regards Rudi
|
|
|