1
votes

I have a page with two regions (DIY forms), with two buttons - page structure shown below. I want these buttons to branch to different locations, but am struggling (using Apex 4.2).

The buttons both 'SUBMIT', and I have tried but failed using:

  1. Creating two branches, one on 'SUBMIT (Button 1)' and other 'SUBMIT (Button 2)'
  2. Creating processes on each button press, using the following code (X different on each):

    BEGIN
    
    htp.init;
    owa_util.redirect_url('f?p=&APP_ID.:X:&APP_SESSION.);
    apex_application.stop_apex_engine;
    
    END;
    

For both approaches, after one button is pressed, it simply uses the action/branch listed higher on the page editing screen. I also tried dynamic actions, but no luck - PS/SQL syntax errors using the code above?

There MUST be an easy answer to this!


Page Structure

  • Region 1
    • Button 1
  • Region 2
    • Button 2
2

2 Answers

2
votes
  • First, You should assign your SUBMIT Buttons different NAMES for each region so you can identify what process will execute if such button is pressed.

for example:

SUBMIT_region1 => SUBMIT button for region 1
SUBMIT_region2 => SUBMIT button for region 2

  • Create Branch:
    Branch Point => On Submit After Processing ;
    Branch Type => Branch To Page URL, if you want to branch to different page in the application;
    Choose Destination Page;
    Lastly, WHEN BUTTON PRESSED => Select Your Button Name.

0
votes

If you create two branches with propertues:

"Target type" : Page in ths Application
"Page"        : your desired page number
"When Button Pressed" : your button name

Or you can rewrite your processes:

"When Button Pressed" : your button name OR

"Condition Type" : Request=Expression1
"Expression 1" : your button request (button name)

Or you even can create unconditional process to set some hidden field value to target page number and then create branch where "Page" property set to "&HIDDEN_FIELD_NAME." This will be replaced with current hidden filed value.