SharePoint Designer Workflow – Majority Voting

Recently faced with the challenge of writing a SharePoint Designer workflow that moved a change request thru 6 steps. One of those steps asked 12 team members to vote on the request. As soon as a majority vote was determined, the step could end, and the workflow could continue. This meant not all 12 people needed to vote, the workflow only needed to know that more than 50% of the voters had chosen to approve or reject the request.

By leveraging the Task Customization Tools in SharePoint Designer 2010 and the Task Process Result Data source, here’s how I did it.

  1. Add Start Approval Process action to my workflow.
  2. Click Approval link to view the Approval Task page
  3. Change the name to ‘Majority Voting’
  4. Click on the Change the behavior of a single task link
  5. Scroll down to the When a Task Completes step
  6. At the end of this step add logic to end the Majority Voting task and continue on with the workflow
  7. In the screen shot below I’ve added the few lines required:
    1. Add comment to indicate changes
    2. Insert If any value equals value condition
      1. Click the first value link
        1.  Leverage the Task Process Results Data source for the first value of the condition. This Data source contains great fields for use in this situation.
        2. Select the Percentage of Approved Field from source.
        3. Click OK
        1. Change equals to is greater than
        2. Click the second value link and enter 50
      2. Add a Log to History List action
      3. Add a End Task Process action
      4. Add an Else-If Branch
      5. Add an If any value equals value condition
        1. Leverage the Task Process Result Data source again, this time using Percentage of Rejected field
        2. Change equals to is greater than
        3. Change second value to 50
      6. Add a Log to History List action
      7. Add a End Task Process action
  8. You have finished using the Task Customization Tools, in the breadcrumbs click on Editor to go back to the Editor for the main workflow
  9. Click on these users link
  10. Add the participants
  11. Swith from One at a time (serial) to All at once (parallel)
  12. Add a Title and Instructions
  13. Click OK
  14. The Majority Voting step is done

One Reply to “SharePoint Designer Workflow – Majority Voting”

  1. Hi,

    I currently have implemented this majority voting structure in our environment. I ran into some odd behavior while using SharePoint groups in parallel. It will only use one vote if you use a SharePoint group, however it will send email to everyone in the group. Has anyone else ran into this or is there a solution that I am unaware of?

    Thanks,

    Tony

Leave a Reply

Your email address will not be published. Required fields are marked *