Skip to main content

I am looking for a solution to put a validation on required fields

I have a workflow in which if Manager approves the request no comments are required. If a request is rejected a comment field must be completed. I am able to validate when requestor is submitting a form (So initial form validation is not a problem). I want to validate as the workflow progress (I need help on this). 

For achieving this I am putting validation rule on when update button is clicked on approval state of the form because I want validation as the workflow progress (not the base state) please see the attachment.

In current scenario, with this rule when manager selects 'No' and try to submit it without comments it shows validation message but it also shows form has been submitted tab and upadate the sharepoint list with data. So rules are executing this way:
1. if current Workflow Activity is Manager Approval
2. and on view, Control contains 'No'
3. and the Form passes validation Configured
4. then complete the following one after another
 then on URLChangeControlForm SmartObject, execute its Update List Item method
 then hide URLChangeControlForm tab
 then show Submitted tab


 Rule 4. is inherited from the base state in approval state of the form (see attachment). In ideal scenario, it should only show validation message but should not show form has been submitted tab and upadate the sharepoint list with data.

Looking help on it. How can I fix this problem?


13684i8156081853C97534.png

Could you just try performing a manual validation in such a way using an Advanced Condition and Unbound Rules

 

IF(Validation Passed)

{

Code for Success full validaiton

}

else

{

Show Validation Message

Stop Rule Execution

}

 

Just add Stop Rule Execution Rule and give a try.


Thanks for suggestion. I am putting stop rule execution in else condition. Please see the attachment. However, with stop rule execution, next level approval that is Director approval is not able to execute as well.   I have 6 approval levels in workflow. I need to put same validation on 4 approval levels.



Reply