How to capture button press (click)
I have a page with a region on it that calls a PL/SQL procedure. I also have a text item (input field) and a button associated with the region.
My goal: take the value from the text field and pass it as a parameter to the procedure when the user clicks the button.
I am able to pass the parameter without a problem. For example, this works:
MyProcedure(:P1_REQ_ID);
However, if I try to make it conditional upon the button click, it fails. The name of the button is "RUN".
Here is my code:
if :REQUEST = 'RUN' then
MyProcedure(:P1_REQ_ID);
else
MyProcedure(0); --- this always executes
end if;
I have also tried using v('REQUEST') instead of :REQUEST, but it did not work either.
What am I doing wrong?