cancel
Showing results for 
Search instead for 
Did you mean: 
Workflow Hero

Problem with userProfileLookup returns #value

Hello everyone, 

I had a problem with the sharepoint form, I want to get the username by userProfileLookup and I used this function 

userProfileLookup(Current User,"PreferredName")

and it returned #Value 

what is the problem?

Labels: (1)
Reply
9 Replies
Workflow Hero

Re: Problem with userProfileLookup returns #value

PreferredName doesn't sound like a valid property, or at least one that isn't used. Try "DisplayName"

0 Kudos
Accept as Solution Reply
Workflow Hero

Re: Problem with userProfileLookup returns #value

I actually tried everything, all functions like "DisplayName", "First Name", "LastName" and "UserName"...etc. But all of them didn't made any difference, still they return #Value 

0 Kudos
Accept as Solution Reply
Workflow Hero

Re: Problem with userProfileLookup returns #value

try using single quotes userProfileLookup(Current User,'PreferredName') also try publishing it and checking the actual form but not in preview mode. Shouldn't be a reason why it's not working. You can also try instead of Current User variable, use and actual domain/user to see if it has something to do with that.

Accept as Solution Reply
Workflow Hero

Re: Problem with userProfileLookup returns #value

I am assuming you selected Current User and didn't just type it in?

Accept as Solution Reply
Workflow Hero

Re: Problem with userProfileLookup returns #value

I tried it too now and still no use ): 

someone told me the problem may be from the directory 

because everyone have the same problem in my team

I think this is the only solution remain

0 Kudos
Accept as Solution Reply
Workflow Hero

Re: Problem with userProfileLookup returns #value

yeah I tried to type it in and it gave me an error, it didn't work at all. Maybe because the version of SharePoint I'm using is 2017 it's not accepting the typing way 

0 Kudos
Accept as Solution Reply
Workflow Hero

Re: Problem with userProfileLookup returns #value

Badeea,

In order for it to work you have to select the "CurrentUser" variable from the right. You can't just type it in. If you've don it correctly it will show in red. You tried it that way, right?

Accept as Solution Reply
Workflow Hero

Re: Problem with userProfileLookup returns #value

Yes I tried all ways to do it, but also with no use, the problem still didn't get solved

0 Kudos
Accept as Solution Reply
Workflow Hero

Re: Problem with userProfileLookup returns #value

Is your sharepoint environment synced to active directory with sharepoint's user profile service?

0 Kudos
Accept as Solution Reply