Here’s the situation. You have an email address and you want to display the login name (domain\username), display name (Russell Wright) and perhaps the user ID from the SharePoint user list. Here are the steps to accomplish with a SharePoint Designer 2010 workflow.
We start by creating a custom list and add the following fields.
The main field is Email PP (email people-picker) that we will populate with an email address.
Using the people-picker for an email address can be problematic if you have multiple user IDs with the same email address.
However, you should be able to select the correct one you want to use.
If you pick an email address that is related to a single AD account, you shouldn’t have this issue.
You’ll notice the workflow named Set Fields executed and populated several other fields. See the Completed link under the Set Fields column? This link will take you to the workflow history list. Let’s see how this is done in the workflow.
We’ll start with a simple list workflow created on our custom list. The start options are set as shown.
Begin by creating all the variables you’ll need. We will create string variables for each attribute we are dealing with.
Using the action Set Workflow Variable, we’ll read the Email PP field and set a variable for each variation of the field we want to set in a text field. In this example we create the variable named LoginName and set its type to string.
We then set its value to Email PP from the Current Item. The important thing is to return the field as Login Name.
Repeat this process for each variant of the people-picker field you want.
As a matter of good practice, log the fields to the workflow history list so you have a record of what they look like.
This action will give you an entry in the workflow history that will display the values of your variables.
Now, on to the step to set the fields in the list, using Update List Item.
Insert an Update List Item action.
Here you can set each field to your variable values.
Here is an example of setting the LoginName Text field with the LoginName variable.
And the final result should display multiple attributes of the person in the people-picker field.
0 Responses to “Updating a SharePoint List with Login Name, Email Address, Display Name and User ID with a 2010 Workflow”