Code Sharing [message #663370] |
Wed, 31 May 2017 13:21 |
|
sourabh2511
Messages: 3 Registered: May 2017
|
Junior Member |
|
|
Hi,
I have a form where I have two buttons. There is a piece of code in button 1 which I want to use again in button2. IS there a way to share the code from button 1.
Regards
Sourabh
[MERGED by LF]
[Updated on: Fri, 02 June 2017 15:42] by Moderator Report message to a moderator
|
|
|
|
Program unit [message #663419 is a reply to message #663370] |
Fri, 02 June 2017 09:42 |
|
sourabh2511
Messages: 3 Registered: May 2017
|
Junior Member |
|
|
Thank you Surprised I was able to do that.
Hi,
I have a program unit that I need to call from two triggers (When-button-pressed from two different buttons). Depending on which trigger is calling the program unit, I need to display a message. Can you please help me to understand as to how do I know which trigger is calling the program unit ?
[Updated on: Fri, 02 June 2017 15:41] by Moderator Report message to a moderator
|
|
|
|
|
Re: Program unit [message #663449 is a reply to message #663427] |
Fri, 02 June 2017 15:45 |
|
Littlefoot
Messages: 21823 Registered: June 2005 Location: Croatia, Europe
|
Senior Member Account Moderator |
|
|
@Michel: because we've just done the opposite. As this question is closely related to OP's previous topic, I merged them.
@sourabh2511: another option would be to add a parameter to the procedure. You'd pass it from the WBP triggers and display the appropriate message. Here's what I mean:
procedure your_prc (par_which_wbp in varchar2) is
begin
... your code here
if par_which_wbp = 'first' then
message('WBP 1 pressed');
elsif
...
end if;
end;
|
|
|