userProfileLookup PreferredName returning #Value!

  • 4 December 2017
  • 10 replies
  • 149 views

Badge +8

I'm trying to use userProfileLookup to return "PreferredName" but it's returning "#Value!". The formula I first tried was userProfileLookup(Current User, "PreferredName") from Retrieving User Account Display Name with Nintex Forms - Nintex Knowledge Base .

I even tried doing a substring of the first 7 characters since normally CurrentUser returns "i:0#.w|domainuser" but that didn't work either. 

I read through Returning displayName using userProfileLookup and a separate thread where the fix was creating a site at the root level. Neither was my issue. 

I should also specify that hardcoding the domainuser in the calculated value doesn't work either. 

I have no idea why this isn't working for me. Anyone have anything different I can try?


10 replies

Userlevel 4
Badge +12

Hi,

could you provide a screenshot of the configuration of your formula?

Usually it should work with using userProfileLookup(Current User, "PreferredName"). Do you face the same problem with different accounts too?

There might be a problem in the connection to your user profile service. If you use Nintex Workflow enterprise edition you can easily test this by creating a workflow with a query user profile action. There you can manually read one or more properties from current user / initiator and see if the variables contain the expected data. If not, then you'll need to fix that connection first, if yes, then the problem seems to only affect forms.

Best regards

Enrico

Badge +9

Formula works for me:

userProfileLookup(Current User,"PreferredName")

Have You inserted the term Current User by clicking on it in the function builder under the tab common?

Badge +8

I agree. It seemed pretty straightforward. I don't know why that doesn't work for me. 

Correct. It failed regardless of the actual Current User. I'll take a look at the query user profile workflow action. Thanks for pointing me in the right direction to troubleshoot further.

Badge +8

Correct. That is my exact formula and I'm positive I added it from the common tab. To see if I was having an issue with the "Current User" I hardcoded the domainuser in there and that failed as well. 

Badge +5

I have the same issue! however for me sometimes it returns the correct value and sometimes doesn't! using user profile query in workflow is a good approach however once a rule is needed based on the person properties on the form level, workflow doesn't work!

In my case I need to hide a filed if the current user equals manager of my people picker filed! 

Badge +9

i recently updated to the new workflow and form builds and i am having trouble with this as well. However if i just leave current user from the common section it displays my name , but the whole point of this is to trim the domain and other unnecessary stuff.

Badge +4

I found this and it is work for me.

217229_pastedImage_1.png

Badge +9

Thank you! This is working for me now in my production.

Badge

Here is a link to the document: Manage forms (nintex.com) 

Google keywords: nintex allow forms user profile

 

Badge +1

@nj 

That is what i did to display PreferredName in a calculate value 

  1. My  first calculate Value : substring(Current User, 7, 15), Give it a name such as Ukraine
  2. My second calculate value . I use this formula userProfileLookup(Ukraine,"PreferredName"), it will display The Preferred Name 

Tks U MaisaNintex 

Reply