cancel
Showing results for 
Search instead for 
Did you mean: 
nj
Nintex Newbie

userProfileLookup PreferredName returning #Value!

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|domain\user" 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 domain\user 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?

Labels: (1)
0 Kudos
Reply
8 Replies
praios81
Nintex Newbie

Re: userProfileLookup PreferredName returning #Value!

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

Reply
mlauer
Nintex Newbie

Re: userProfileLookup PreferredName returning #Value!

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?

0 Kudos
Reply
Highlighted
nj
Nintex Newbie

Re: userProfileLookup PreferredName returning #Value!

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.

0 Kudos
Reply
nj
Nintex Newbie

Re: userProfileLookup PreferredName returning #Value!

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 domain\user in there and that failed as well. 

0 Kudos
Reply
sarasafari
Nintex Newbie

Re: userProfileLookup PreferredName returning #Value!

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! 

0 Kudos
Reply
brightlight
Nintex Newbie

Re: userProfileLookup PreferredName returning #Value!

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.

0 Kudos
Reply
joelau
Nintex Newbie

Re: userProfileLookup PreferredName returning #Value!

I found this and it is work for me.

Reply
brightlight
Nintex Newbie

Re: userProfileLookup PreferredName returning #Value!

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

Reply