Forum Discussion
Sharepoint Workflow
My organization has a department with six divisions. I am creating a form in Infopath, also a workflow in SPD, that would request information from the department. Not all request will include all divisions. When a request is created, there are check boxes on the form to identify which division needs to respond. An email is then sent to the appropriate division/people. However, there is a chance that the original request did not include the correct divisions so a modification to the form is required. Is there a simple way to account for this in the workflow?
I was thinking to include hidden fields in the form that kept the original value of the included divisions. Then create a workflow that would fire when a modification was made to the form and compare the values of newly added or subtracted divisions. The workflow would send out emails based on this comparison. Am I headed in the right direction?
Thanks!
That's the way we do it in SharePoint 13. It makes it less cumbersome if you could add your divisions into a single multicheck field, and make the hidden field a regular text field.
Then you could do a compare like this:
If HiddenField is not equal to (divisionField, as String)
if DivisionField contains 'Division 1'
and HiddenField not contains 'Division 1'
... then you know the division 1 field was just checked and do the div 1 email
and then save the division fields as string into the hiddenfieldIf the divisions are different checkboxes, you'd have to have a hidden checkbox for each one and test them all separately...
2 Replies
- Robin NilssonBronze Contributor
That's the way we do it in SharePoint 13. It makes it less cumbersome if you could add your divisions into a single multicheck field, and make the hidden field a regular text field.
Then you could do a compare like this:
If HiddenField is not equal to (divisionField, as String)
if DivisionField contains 'Division 1'
and HiddenField not contains 'Division 1'
... then you know the division 1 field was just checked and do the div 1 email
and then save the division fields as string into the hiddenfieldIf the divisions are different checkboxes, you'd have to have a hidden checkbox for each one and test them all separately...- Rob NunleyBrass Contributor
Thanks Robin! I think that will to the trick.