Executing a trigger using code?

I have an Edit button, and I want to execute the WHEN-BUTTON-PRESSED trigger from another object on the screen.  Is that a command that will enable me to run that trigger?

To be more precise, I have a textbox on the screen, and when the user double-clicks the textbox, I want to run the code in the button's WHEN-BUTTON-PRESSED trigger.

Thanks,
Brian
bekAsked:
Who is Participating?
 
santoshmathewConnect With a Mentor Commented:
Hi,

You can use the built in Execute_trigger('Tigger-name') to do this.

You can write  Execute_trigger(When-Button-Pressed');

in another trigger/Program Unit to execute the When-Button-Pressed trigger.

Cheers.
0
 
p_yaroslavCommented:
Hello!

May br better create event ON-DOUBLE-CLICK???

Yaroslav.
0
 
Mark GeerlingsDatabase AdministratorCommented:
Move the code you want executed from the when-button-pressed trigger to a new program_unit in the form.  Then from the when-button-pressed trigger simply run the program_unit.  Also, create a when-mouse-double-click trigger in that text item that runs the same program unit.
0
Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

 
schwertnerCommented:
Use EXECUTE_TRIGGER built-in to execute that trigger in When-Mouse-DoubleClick Trigger.

A better solution is to embed the code invoking the editor in a program unit belonging to the form and invoking this program unit (procedure) in both places.
0
 
santoshmathewCommented:
Sorry, looks like Schwertner and I was typing were typing at the same time.
0
 
bekAuthor Commented:
I took markgeer's advice and put the code in a program unit.  How do I run a program unit?

(Thanks for the help, guys.  I guess it's obvious I'm new to Oracle.)
0
 
bekAuthor Commented:
Thanks to everyone.  I awarded the points to the answer that seemed the most straightforward (santoshmathew), but I appreciate everyone's response!

I am getting ready to ask another question about an Oracle trigger I can't seem to find.  It's the equivalent of Microsoft's "Interactive Change Event", for those of you with VB experience.  Watch for my question, coming up immediately!

Thanks,
Brian
0
All Courses

From novice to tech pro — start learning today.