Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Execute a WHEN-BUTTON-PRESSED trigger with EXECUTE_TRIGGER

2,087 views
Skip to first unread message

zorro

unread,
May 12, 2001, 10:08:52 AM5/12/01
to
Hi

May I execute a WHEN-BUTTON-PRESSED trigger at runtime ? My button is called
'Fill'

Is this sentence correct ?

EXECUTE_TRIGGER( 'FILL.BUTTON_PRESSED')

It doesn't work.

Denis


Ludo Van Helleputte

unread,
May 12, 2001, 2:55:59 PM5/12/01
to

Why don't you call a procedure (program unit) from both your code and the
when-button-pressed trigger ??

EXECUTE_TRIGGER is for compatibility reasons (Forms 3) ...

"zorro" <w...@w.com> wrote in message
news:UtbL6.41244$q51.3...@news1.gvcl1.bc.home.com...

zorro

unread,
May 12, 2001, 4:30:22 PM5/12/01
to
Actually, I'd want to do a 'GO_BLOCK' immediatly after jumping out a field
(called INVOICE_CANCEL_NUMBER).
To do that, I am using the WHEN-VALIDATE-ITEM trigger of this field. BUT, I
can't. GO_BLOCK is not allowed here.
If I put my GO_BLOCK instruction in a WHEN-BUTTON-PRESSED trigger, it works
fine !
So I'd like to call my WHEN-BUTTON-PRESSED trigger from the
WHEN-VALIDATE-ITEM trigger of the INVOICE_CANCEL_NUMBER field.

If I use a PL/SQL Procedure (and call it), Froms considers that I come from
a WHEN-VALIDATE-ITEM trigger, and I get the same restriction on the GO_BLOCK
built-in procedure.

Denis

"Ludo Van Helleputte" <Ludo.van....@be.pwcglobal.com> wrote in
message news:3afd8...@news2.prserv.net...

Ludo Van Helleputte

unread,
May 13, 2001, 2:31:17 PM5/13/01
to
Hahaha, nice try, but won't work ... what will work however is the following
;
(this 'trick' will work as a valid workaround to call any restricted
built-in from restricted triggers)

Create a WHEN-TIMER-EXPIRED trigger, put the GO_BLOCK in this trigger
If you have other timers, you might want to put an IF ELIF ELIF END IF
statement in this WHEN-TIMER-EXPIRED trigger to test on
GET_APPLICATION_PROPERTY('TIMER_...

Now, from where you want to call your restricted built in ...
declare
t timer;
begin
t := create_timer('name', ... -- let timer fire asap, fe. 10 milliseconds
...


Good luck !!!
Ludo.

PS : EXECUTE_TRIGGER should work to call triggers as program units, but you
will still receive the 'restricted' built in error ... with the timer you
will have a 'clean' situation, although it doesn't look clean programming.

"zorro" <w...@w.com> wrote in message

news:y3hL6.41664$q51.3...@news1.gvcl1.bc.home.com...

Kuba Pawełczyk

unread,
May 15, 2001, 7:58:43 AM5/15/01
to
ja,ja
Użytkownik "zorro" <w...@w.com> napisał w wiadomości
news:UtbL6.41244$q51.3...@news1.gvcl1.bc.home.com...
0 new messages