I believe you would pass the value of ":REQUEST" to your process.
begin if :REQUEST in ('SAVE','UPDATE') and :P1_itemname = 'A' then return true; else return false; end if; end;
Howard (DBA in Training) wrote:No - I am trying to define the button condition through a packaged function that is dependent on the button name. I have a few buttons and wanted to avoid copy and past errors.
Hello again. I'm trying to understand what you are doing.
1) Are you trying to do something with all the defined buttons at once? But in the general case, you don't know which buttons have been defined because that happens in another process?
2) Are you operating on each button, one at a time as they are rendered?Yes
3) Or, do you want to do some other operation -- separate and apart from the button creation / rendering -- but based upon whether that button exists?No
It seems to me, that the only way you can take some action in a separate process is if you have set some global (i.e., application or page level) item to some value that you will check to determine what action to take.No separate process
Well, one other way. Do you need to know the underlying Oracle tables where button definitions are stored when they are created? Someone may be able to assist with that if that's what we are talking about.Before I go that far and create a dependency that goes beyond the APEX APIs I'd rather risk the copy-and-past error. Be aware of the dragons.
t-o-b wrote:I'm not clear on what you are actually asking.
I know that the "Button Name" is available when a page is submitted through a button in the REQUEST.
Do I have the button name as well available in the "Conditions" section of the button?
this does not work as the REQUEST is only submitted into the session, when the page is submitted.Note that the <tt>REQUEST</tt> value can be referenced during page show processing if it is set in a branch or URL.
I need the "Button Name" during the rendering phase, when the Condition is evaluated.