11
Feb
15

Updating a SharePoint List with Login Name, Email Address, Display Name and User ID with a 2010 Workflow

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.

image

The main field is Email PP (email people-picker) that we will populate with an email address.

image

Using the people-picker for an email address can be problematic if you have multiple user IDs with the same email address.

image

However, you should be able to select the correct one you want to use.

image

If you pick an email address that is related to a single AD account, you shouldn’t have this issue.

image

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.

image

Begin by creating all the variables you’ll need.  We will create string variables for each attribute we are dealing with.

image

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.

image

We then set its value to Email PP from the Current Item.  The important thing is to return the field as Login Name.

image

Repeat this process for each variant of the people-picker field you want.

image

As a matter of good practice, log the fields to the workflow history list so you have a record of what they look like.

image

This action will give you an entry in the workflow history that will display the values of your variables.

image

Now, on to the step to set the fields in the list, using Update List Item.

image

Insert an Update List Item action.

image

Here you can set each field to your variable values.

image

Here is an example of setting the LoginName Text field with the LoginName variable.

image

And the final result should display multiple attributes of the person in the people-picker field.

image

Advertisements

0 Responses to “Updating a SharePoint List with Login Name, Email Address, Display Name and User ID with a 2010 Workflow”



  1. Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


Asif Rehmani’s SharePoint Videos

SharePoint-Videos

Click to access a wealth of SharePoint videos

SharePoint Rx

SharePoint Rx Home

Categories

Posts by Date

February 2015
M T W T F S S
« Jan   Mar »
 1
2345678
9101112131415
16171819202122
232425262728  
Support Wikipedia

%d bloggers like this: