Utilizing people picker in SharePoint Designer 2013 is oftentimes underrated. One of the great native integrations SharePoint has is with Outlook and Active Directory. The ability to connect SharePoint tasks and workflows with a user ID has helped many-a business manage workload more efficiently. Today, we’ll share some tips for how to set the people picker in SharePoint Designer 2013, so you can reap the rewards of this integration.
Types of Fields
SharePoint’s people and groups column allows you to draw many different kinds of information from Active Directory. First name, last name, email, division—the sky’s the limit. If your business is integrated with Skype (soon to be called Microsoft Teams), then you can also see presence information right there within SharePoint. Most workflow automations rely on the email field.
Getting from A to B—Z
When you’re building a workflow, many times the people-picker is looking for one person or a SharePoint group. Both of these can be added to task assignments, collect feedback workflows, and approvals. But what happens when you’ve got multiple people in a single column—and need each of them to receive a task?
For example, you may have a column within a document library designating document owners. As part of your business workflow, those owners need to receive the approval email task when their document is ready to be finalized. Unfortunately, SharePoint reads the field as a single entity, commas and semi-colons included. Therefore, we have to take an additional step in order to break each email out. And fortunately, we can use SharePoint’s looping workflow feature to accomplish it:
- First, create a blank string variable. (That is, create a variable and add a single space as the character)
- Then create a variable using the Document Owners column. Let’s call it DocumentOwnerColumn
- The following will loop until the DocumentOwnerColumn variable is not empty
- Search for the semi-colon ( ; ) in the string, and set the index value
- If the index is greater than 0
- Copy the index value starting at 0 for index (which will copy the first email address) to a new variable (DocumentOwnerEmail)
- Assign a task to variable DocumentOwnerEmail
- Replace the value of DocumentOwnerEmail with $ (or any other character) in DocumentOwnerColumn (This is so we can remove the semi-colon later)
- Then set DocumentOwnerColumn to Variable1
- Then replace $; with your Blank String variable in DocumentOwnerColumn (Set to Variable1) (This will put the next email address first, which will be selected when the loop circles back around)
- Else
- Assign a task to DocumentOwnerColumn
- Set DocumentOwnerColumn variable to BlankString (thus ending the workflow)
More Use Cases
SharePoint’s people picker column can be used in a variety of ways, from assigning tasks to filtering views. It can be tricky to manage with workflows, especially, as there are many quirks and roadblocks within SharePoint Designer 2013 that can hamper you. If you’ve got a tricky SharePoint workflow in mind, contact eSoftware for more information on how best to manage your workflows