Recent

Nintex Forms getting persons profile information

Nintex forms allow you to return user profile information for selected users, the user profile information includes their Preferred Name, department, title, phone, email and more.  See the User Profile values tutorial for a complete list.

What happens in Nintex forms is when you use a people picker field or a reference to the Current User, the value returned is the full login name for the individual which includes the domain (e.g. domainname\username).

Get persons phone number or other profile value

In this example we are going to be getting the person selected in the person or group field work phone number.  See the User profile information tutorial link above for a full list of user profile values you can return.  Here’s our example form with no customization’s, as you can see selecting a user does not populate the phone number:
Nintex-Forms-User-Profile-16-0

1. We have to use a Calculated Value to get user profile information, so first delete the Phone number field, then drag a calculated value control where the field used to be.
Nintex-Forms-User-Profile-16-1

2. You will notice that the calculated value field is not formatted properly though (text displayed in the top right corner).  To fix the formatting, click on an existing field on your form (like the Person or Group Field), then click on Format Painter, the click on your new field.
Nintex-Forms-User-Profile-16-2

3.  This will copy the formatting from the existing field to your new Calculated Value field.  The text should now be centered with a light gray background.
Nintex-Forms-User-Profile-16-3

4.  Double Click on the Calculated Value field to open the Control Settings.  Enter a Name for the control and connect it to the field in the list.
Nintex-Forms-User-Profile-16-4

5.  Click on the Insert Reference icon next to the Formula field.  In the Formula Builder popup window, click on the Runtime Functions tab, then double-click the userProfileLookup function to insert the function into the Formula field.
Nintex-Forms-User-Profile-16-5

6.  Once the userProfileLookup() function in your formula field, click in between the ( ).  Then click on the Named Controls and select your People picker field (Or you could use the Common tab > Current User reference as well).
Nintex-Forms-User-Profile-16-6

7.  After your field reference (which will be displayed in red), add a comma, the inside of quotes put the User Profile that you want to return (WorkPhone, PreferredName, Department, Title, WorkEmail, Click here for full list).  Once your formula is done click the OK button.
Nintex-Forms-User-Profile-16-7

8.  Your Control Setting should look similar to the example below.  Click the Save button.
Nintex-Forms-User-Profile-16-8

Finished Example:  Now when a person is selected in a people picker field, their phone number from their user profile will be returned.
Nintex-Forms-User-Profile-16-9

About Nick Hurst (84 Articles)
SharePoint and Nintex developer who strives to find easy to deploy and maintain solutions for business problems.

11 Comments on Nintex Forms getting persons profile information

  1. Michael Campbell // November 29, 2016 at 8:47 pm // Reply

    This is brilliant!!! I have been looking for this solution for weeks….thank you so much!!

    Like

  2. Leah Giambartolomei // April 11, 2017 at 6:42 pm // Reply

    I am trying to pull in EmployeeID and it is not working. Any advice? Thanks!

    Like

    • Hi Leah, my guess would be that either your organization is not populating the Active Directory EmployeeID field with any values. Or perhaps your SharePoint administrator does not have your user profile service setup to sync that value. For most organizations the information in the SharePoint user profiles comes from their active directory environment. So some organizations only keep the basics like a person’s name, email, etc in active directory. Also perhaps your organization stores the employee ID but in a different active directory field.

      Then the other part of the equation is in SharePoint Central Admin, there is a User profile services. Many of the mappings between the user profiles and AD are already setup, but you can add new mappings as well. This is a good place to check though, as you can see all the profile values for an individual here.

      Like

  3. Renee Voice // August 23, 2017 at 2:20 am // Reply

    Hi

    This may be a slightly different questions but I cannot find an answer on the internet. I have a user who wishes to use the People picker control in a Nintex form – these results are then used in a Nintex flexi task for the approvers. However, the error #value is stored in the list when more than one person is selected in the People control. Do we need to create collection variable and then use a for action in the workflow or is there another solution? Your help would be greatly appreciated.

    Like

  4. How do you get manager’s name instead of manager’s id?

    Like

  5. Hey, thank you writing this aticle.
    I want to read the ‘Manager’ field after put in a user name.
    When everything is done there is a ‘loading’ phrase but nothing happens.

    Other UPS fields doesnt work either. It is running but with no result.
    Any ideas?

    Like

    • When it just loads forever is Nintex way of saying there is an error in your formula. I’d try to redo your formula making sure not to copy and paste anything, and ensuring you have the single quotes and the comma formatted correctly.

      Like

  6. Hey Nick, I have created a PersonField (named it Requester) and set the default value to CurrentUser so it automatically picks the user’s name. Then, I added a calculated field to the form and set the following formular userProfileLookup(Requester,’CostCentre’) but this does not work at all ….

    my aim is to show the CostCentre number of a user whoever is in Requester field. However, if I change it to userProfileLookup(Current User,’CostCentre’) < this works.

    Any suggestions

    Like

    • The first thing I’d check is to ensure you are selecting the ‘Requestor’ field from the Named Control tab and not from the Item Properties tab. That’s the issue we see most commonly in our environment.

      If that isn’t it, the next thing I’d try to to replace CostCentre with a different profile value to see if that works. So can you return the PreferredName or WorkEmail for example?

      Like

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

%d bloggers like this: