Instead of as condition selecting a button try setting the condition REQUEST = EXPESSION ONE and in expression one type SAVE
But dont I need to run the DML process with the 'SAVE' request?
Why? Is the DML process not working?
The DML runs ok. I need to branch depending on which button so:
Button 1 - branch to inventory (condition in branch set to when Button 1 pressed)
Button 2 - branch to sale (condition in branch set to when Button 2 pressed)
Button 3 - branch to delivery (condition in branch set to when Button 3 pressed)
Button 4 - branch to installation (condition in branch set to when Button 4 pressed)
All buttons are set to submit page and send a request of 'SAVE' to fire the DML process then conditional branches are set up so enable the app to branch off depending on what button is pressed. No matter what button I press they all branch to the same page and ignore the conditions in each branch.
Any ideas? Or am I making this too complicated?
When button1 pressed set a hidden item to the page you wish to branch to, same for each button, and have a branch to page condition setup with hidden variable holding the page # to branch to..
So if I understand you correctly, do I create a process for each button that sets the value of hidden item.
So 4 buttons = 4 processes to set the value before running the DML then a branch after the DML thats set by the hidden item?
1 person found this helpful
Your problem is with setting the request of all the buttons to "SAVE", it will always fire the first branch for all those buttons.
If you edit the DML process you will see the following:
SAVE, APPLY CHANGES, UPDATE, UPDATE ROW, CHANGE, APPLY, APPLY%CHANGES%, GET_NEXT%, GET_PREV%
This tells you the request values that will perform an Update DML.
You could have one button be "SAVE", another, "APPLY CHANGES", another "UPDATE", and another "CHANGE". They will all do the update DML for you and then the branches will have different request values to trigger off of.
Another option is to set the request of each button like this:
Button 1 - APPLY_CHANGES_INV
Button 2 - APPLY_CHANGES_SALE
Button 3 - APPLY_CHANGES_DELIV
Button 4 - APPLY_CHANGES_INSTALL
These would satisfy the valid update request value of APPLY%CHANGES%
I didn't knew all your buttons send the same request then it's normal that your different branches mess up, because your processes and branches look at the request your button sends and not at the label of your button. You will need to make sure they each give a different request.
Thanks Joni and Jeff.
It was the request. Good to understand the APEX behaviour a bit better.
Thanks for your help.