I'm currently making a little demo exercise and ran into a validation problem. Because you need to understand my situation for this, I'll explain my scenario:
After a user has checked all the checkboxes of status #1, the user can switch to status #2.
There are two ways to switch to status #2. The first one is by editing the record, and then selecting status #2 from the 'Status' dropdown field, created by the Workflow process. The second way is to press the Workflow action 'Switch to status #2'.
Because the user must first check a 'Do you want to proceed?' checkbox, the first method to switch to status #2 has been disabled as the user can only check this checkbox on the status page. I disabled this first method using the 'Status' field validation.
Okay so we have to use the second method, via the workflow action. Here comes the problem: Because I only want to show the 'Switch to status #2' action after the user checked all checkboxes, I can no longer use the action's execution condition as a validation for the confirmation checkbox. Since I cannot, I must find another way to verify the check before executing the action.
So there are a couple ways I imagined. The first way was by using the Status field validation, because the status changes when executing the action. After some testing I discovered that the status field validation is completely ignored when executing a status changing action.
The second way I imagined was by using a validation trigger, because the documentation stated that validation triggers are executed even before the 'Before Update' triggers. Apparently, the 'Before Before Update' triggers are executed after the action has finished execution. Which makes them impossible to use as well.
There are basically two ways I know of now to work around this issue:
And I also have three suggestions:
Does anyone know a way to work around my problem, but by keeping this scenario the same?
Unfortunately I already use this to prevent seeing the workflow action on the edit page (page #1), so I cannot use it to validate a checkbox on the status change page (page #2).
No, I'm only using the confirmation checkbox on the second page.
Yes, after the user checked all checkboxes on the edit page of status #1, the user will be able to see the "Switch to status #2" action link. When clicking this he'll be transfered to the Status change page, where he has to check the confirmation checkbox. When he has checked this last box, he'll actually be able to change the status.
Don't worry! I'll use some pictures to explain it a bit better:
Status change page
As you can see they're not the same checkbox. The 'Entered and appointed employee' checkbox is a final checkbox that needs to be checked before going to the next workflow status.
I see where the confusion lies. You are displaying the workflow action in the edit page itself. Can you add the workflow action in the view page instead so that the user needs to check the entered customer checkboxes first and then after saving the record, the workflow action #2 will show?
I managed to work around the problem. I set the workflow action's condition so it'll only show when all these customer checkboxes are checked. Also, this small issue took me way too much time to fix, but I simply added a validation on the final checkbox.
I can imagine the text I posted in my first post was a bit hard to take in, seeing that it's a huge text. So thanks a lot for the help!
I'd like to ask Rollbase devs a final question: why is the 'Status' field validation skipped when executing a status changing workflow action?
The explanation for this is because field validation only works inside the page form. If you try to put the workflow status field inside the workflow action change status page and then return an error inside the formula validation it will work as expected.
I hope this helps.
Ah I see! But that also means it's very important that I don't forget to verify that the user didn't just remove the status field from the status change page right?
Thans for your reply! How would I be able to prevent the execution of a status changing workflow action?
You can try to add the field validation on the available fields in your workflow action page instead. I believe that's the only way unless you want to create a trigger validation instead.