Making the Most of the Person List Field


I have recently been working with some interesting SharePoint lists in which I am requiring users to submit forms that include user contacts. I am using the Person or Group field in my SharePoint list, but I am limited to only show one of the following options below:

  • Name (with presence)
  • ID
  • Name
  • Modified
  • Created
  • Account
  • E-mail
  • Mobile Number
  • SIP Address
  • Department
  • Job Title
  • Name (with picture)
  • Name (with picture and details)
  • Content Type

Typically I like the end user to see the Name (with presence) option, but I want to be able to easily use the Account and E-mail fields because I am using this list as a Mail Merge data source. (Click Here to find out how to use a SharePoint list as a Mail Merge Data Source). There is no way through the web interface to have the user enter data into a single field but then break that info into multiple fields for use in a Mail Merge Data Source. This is where we have to get our Workflow gloves out. This article will walk us through the steps to automatically set one column field based on the user inputted Person or Group column.

Step 1 – Setup the List

This step is very straight forward so I won’t go into the details of how to create a custom list. For the purpose of this tutorial, I will be showing how to copy the e-mail address from a Person column named Contact Name in the Name (with presence) format to a column named Contact E-Mail formatted as E-Mail (see below).

**NOTE: Use the Person or Group column type for the Contact E-Mail column if you want the clickable link to bring you to the user profile.

Step 2 – Create the Workflow Actions

The workflow we will create here will be relatively simple, though you can make it as complex as you want. You can do multiple field copies if you like in one Workflow.

  • Navigate to your List
  • In the List Tools tab click the List tab
  • Click the Workflow Settings drop down menu in the Ribbon (shown below)

  • Click Create a Workflow in SharePoint Designer
  • Enter a Name and Description for your new Workflow (see below)

  • Click OK
  • You will be presented with an empty Workflow with one Step created for you (see below)

  • Click the Step 1 title bar and change the name to Step 1 – Contact Copy (see below)

  • Click in the Step 1 – Contact Copy body then click the Action drop down menu in the Ribbon (see below)

  • Click on Set Field in Current Item option found in the List Actions Section
  • You will now see “Set field to value in the Step 1 – Contact Copy step (see below)

  • Click the field link, this will display a drop down showing the columns within your list. Select Contact E-Mail (see below)

  • Click the value link, which will open a new dialog box (see below)

  • Select Workflow Lookup for a User… then click the Add>> button (see above)
  • A new dialog will open (see below). Enter the following information
    • Data Source: Current Item
    • Field from source: Contact Name
    • Return field as: Email Address

  • Click OK
  • The Select Users screen from before should now have the following Selected users in the text field: Current Item: Contact Name (see below)

  • Click OK
  • Repeat these steps for each column you need copied

**Advice** I recommend you group your STEPS by common Contact. If you plan on having multiple contact fields and then copy those into E-mail, Account, etc. organize them by user

Example

Step 1 – Site Administrator Copy

Actions

Step 2 – Site User Copy

Actions

Step 3 – Configure Workflow Settings

The final step is configuring the workflow settings. This is the how and when your Workflow will be initiated and by whom.

  • From the Workflow editing screen in SharePoint Designer click Workflow Settings in the Ribbon (see below)

  • Locate the Settings zone in the Workflow Settings screen (see below)

  • You may choose to use a different Task List and History List. For this tutorial, we will use the default Tasks list and Workflow History list.
  • In SharePoint 2010 Standard and Enterprise you can choose to select the Show workflow visualization on the status page (see above). We will leave this box unchecked for this tutorial.

Workflow Visualization utilizes the Visio Services which are not available in the Foundation version

  • Locate the Start Options zone in the Workflow Settings screen (see below)

  • Choose which options your workflow requires. We will check all for the following reasons
    • Allow this workflow to be manually started– I want to be able to select a list item and run the workflow myself at any time
      • Require Manage List permissions – I don’t want anyone but myself and those I delegate the ability to manually run the workflow. Useful for lists with large numbers of potential users.
    • Start workflow automatically when an item is created – Useful in automating the initiation of the workflow without human interaction except for the actual list item creation.
    • Start workflow automatically when an item is changed – This is a good setting to ensure your fields stay up-to-date even if someone changes a field. Be careful not to have users manually set a column field that is set to be modified by the workflow or their information will be overwritten.

Step 4 – Save and Publish

The final step is to save your workflow and then publish it to your list. This is a very simple process but you must ensure you do both a save and publish otherwise you may not see the workflow.

  • Click the Save button in the Ribbon (Click Save as often as you want so you don’t lose your work)
  • If you aren’t already in the Workflow editor portion of the program then click Edit Workflow link in the Customizations zone (see above)
  • In the ribbon click Check for Errors (see below)

  • Make sure you get a message indicating there are no errors (see below).

  • Click OK
  • When you are ready to publish the workflow to your list, click the Publish button in the ribbon
  • Navigate to your site and test out the list. Add a new list item and the Contact E-Mail field should be automatically populated

I hope these instructions were helpful. Please do leave comments if you have questions or see errors in my instructions or you have trouble understanding them.

Advertisements

2 thoughts on “Making the Most of the Person List Field

  1. Thanks, We want to copy field in the same list and also field copy one list to another list is it possible out of box using Sp Designer work flow

    • So are you saying you want to copy a field from one list and essentially past that field info into a field within another list? Do you have a specific trigger that would dictate when this copy would occur? If it’s the above scenario then yes you can do that in SPD. If you’re wanting to copy an entire list then I’d recommend using PowerShell which your Farm Admin should do.

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