Use case: You have been given a task to create an email notification from your workflow that contains full name of the user who created certain item, along with some other information that is irrelevant to this blog post.
While creating workflows in SharePoint Designer you will quickly notice that most activities will display Person columns (like Created By or Modified By) as username (e.g. CONTOSO\toni or even i:0#.f|aspnetmembership|toni) not full name.
Here is a couple of simple steps to overcome that problem (all the screenshots were created with SharePoint Designer 2013).
- Create a new workflow in SharePoint Designer
- Insert Send an Email action and then click These Users link
- In the Define E-mail message field type your desired email body text and click Add or Change Lookup
- In the Lookup for String dialog
- Select User Profiles as Data source
- Field from source: Name
- In the Find the List Item, select Account Name as field and then filter by Current Item: Created By (or Modified By, or some other Person column, or any other column that contains username)
This simple procedure will instruct your workflow to Query User Profiles store and to retrieve Name of a User whose Account Name equals Current Item: Created By (you can filter by any other column that is a Person column or contains username of a user).