Skip to main content

I'm trying to use the following function for a calculated field on a form but no value is being returned:

     userProfileLookup(Current User,"displayName")

We're using Claims-based authentication for our SharePoint 2013 on-prem farm. So our user names are in the format of:

     i:0#.w|domainusername

The userProfileLookup in-line function help text listed the syntax of the function as:

    userProfileLookup("domainlogin", "InternalPropertyName")

So I tried substituting a manual value for the current user value to see if maybe it was because our usernames were in Claims format:

     userProfileLookup("domainusername","displayName")

Still no dice.

What I'm attempting to do is use the display name of the current user in a form rules formula to hide a field on a form unless the current user is listed in at least one of several people picker fields on the form. But I'm struggling to get the Current User value into a format that will match the values in the people picker fields.

Using Nintex Forms 2013 Standard ver 2.5.0.0 and SharePoint 2013 Enterprise Aug 2015 CU

Hi Steven,

are you sure your internal property is called "displayName"? Have you tried "Name" or any other property to see if it's a bigger problem or just the wrong property name?

Cheers

Philipp


Yes, I've tried Name as well. I took your suggestion and tried to return "Department" and it's grabbing the correct value. Using ADSI Edit I've confirmed the displayName field of the account I'm testing with does have a value in it and according to Central Admin, it's properly mapped to the "Name" property name in our UPS service.

Using the following I get back the first name of the current user viewing the form:

     userProfileLookup(Current User,"FirstName")

Note that I get nothing back if I use the following with a space between First and Name:

     userProfileLookup(Current User,"First Name")

This lead me to think the UPS service was using a different value for the property name. So I checked the property mappings in our UPS and discovered you can find the "Name" of a property in the UPS by editing it. In the Property Settings section of the property you're trying to retrieve, look in the Name field. It turns out that the UPS is using "PreferredName" to represent "Name" which is mapped to the Active Directory property "displayName".

So using the following, I successfully retrieved the display name of the current user:

     userProfileLookup(Current User,"PreferredName")


Here's a helpful link to a TechNet document that lists the user profile properties that SharePoint Server 2010 provides by default.

Default user profile properties (SharePoint Server 2010)


Very useful post. To add to this, please make sure that the user profile app permission is configured at the site level.

To allow application to access user profiles:

- Go to Site Contents for your site, click the Nintex Forms for Office 365 app.
- On the upper right of the Nintex Forms for Office 365 page, click Nintex Forms Admin and then select Allow Application Access to User Profiles.

- Click Trust it.

215594_pastedImage_1.png


Hello Debo, I don't see the "Nintex Forms Admin" option on the right like you are showing. I have signed in as a SharePoint Administrator as well as a Global 365 administrator. What could be causing this?


Hi Courtney,

You should be seeing this if you have at least Site Owner access to the site. Try adding yourself in the Site Owner group and see if that resolves the issue. Also make sure you have the recent version of the Nintex Form App ( I am running version 1.2.4.1).

If any of these don't work, I recommend to reach out to Nintex support for more targeted solution.

Thanks,

Debo


Hello Debo, great suggestion! There is no "Site Owner" group for this site. I am a Tenant Admin, but I went ahead and granted myself "Full Control" as well, just to see and still no "Nintex Forms Admin" button showing! I am also in 1.2.4.1 and don't see an available update. I will reach out to Nintex to see if this can be resolved. Thanks for your assistance!


Great. Keep me posted about the suggestion from Nintex support if you get a chance.


Reply