By default, SharePoint 2007 workflows do not resolve Windows domain accounts into first and last name structures – only domain\username. This can be frustrating to end users who do not know who the user name is referring to, depending on how your company structures user names. This blog post explains how to translate cryptic user names into a real person’s name when using workflows in SharePoint by setting variables.

Please note: The steps below are instructions for my particular SharePoint environment at work. Although the steps are general, they may or may not pertain to your environment specifically as stated below. If that is the case, just remember Google is your friend. :)

Here we go!

  1. Open SharePoint Designer
    1. Select New > New Workflow
      1. Name workflow
      2. Attach workflow to list
      3. Select workflow start options
  2. Add New Variable
    1. Click Variables (bottom of screen)
      1. Click Add
        1. Select type
        2. Enter variable name
      2. *Notes
        Unless comparing two different types of data, the default value String will work for most variable types
  3. Set Variable in Workflow
    1. Add new workflow step
      1. Enter a name for the workflow step
      2. Select Actions > Lookup User Site Property
        1. Enter “Title” in the [Lookup this user property] field
        2. In the second this user property field, click the function icon
          1. Select Current Item Select appropriate field
          2. Click OK
        3. In the [Store in Variable: variable#] field, select the appropriate variable from drop down menu
      3. *Notes*
        1. This step must be the first step in the workflow
        2. You may add this action more than once in the same workflow step
        3. Actions can run sequentially
  4. Use Variable in Workflow: Send Email
    1. Add new workflow step
      1. Select Action > Send Email
        1. Within the text area, click Add Lookup to Body
        2. Change Source to Workflow Data
        3. Select appropriate variable in Field
        4. Click OK