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?
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.