SharePoint list and libraries store people picker columns (i.e. Created By, Modified By, Assigned To, etc) values as the person’s claims based login name to ensure each value is unique. If you are using a Nintex Workflow and try to populate a text field or include one of the people picker fields in the email body, their login name will display. Take a look at the Nintex Workflow example below, the email has the ‘Created By’ field reference in it, but when the email is sent it’s displaying the login name:
Get a Persons display name in Nintex Workflows
To get a person’s name to display in a workflow email instead of their login, you will need to create a workflow variable and populate that variable with the person’s user profile name.
**If you have Nintex Workflow Enterprise edition, there is a ‘Query User Profile’ action which can be used instead of the ‘Set variable’ action displayed below.
1. Either create or edit an existing Nintex Workflow. Add a Set variable action to the workflow.
2. Double click on the action to configure the action, click on the Variables icon.
3. Click on the New icon on the Workflow Variables popup window, then enter a Name for the Variable. Click the Save button which will close the window. Then click the Close button which will close the window and return you to the Configure Action – Set variable window.
4. A. Now you can choose your variable in the Set dropdown field.
B. Choose User Profiles from the Equals dropdown menu.
C. Choose Name from the Source dropdown menu.
5. Click on the Insert Reference icon, on the Insert reference popup window click on the Item Properties tab. Choose the people field which you want to get the Name for. In this example we are going to use the Created By field. Click the OK button to close the popup window.
6. Your finished set variable action should look similar to the example below. Click on the Save button.
7. Add a Send notification action to the workflow beneath the set variable action.
8. The person’s name can either be inserted into the Subject field, or in the email Body. Do not insert the workflow variable into the To, CC, or BCC field. The variable is only the display name, it might not be unique like the people field is.
In this example, click in the email body where you want the persons name to appear. Then click on the Insert Reference icon.
9. On the Insert Reference popup window, click on the Workflow Variables tab, click on your workflow variable you created. Click the OK button to close the Insert Reference popup window.
10. Your send notification action should look similar to the example below, with your workflow variable listed in either the Subject or email Body field:
11. Add descriptive names to your workflow actions, then Publish your workflow.
Finished Product: The workflow email now displays the name of the person instead of their login: