Problem with userProfileLookup returns #value

  • 19 December 2017
  • 9 replies
  • 20 views

Badge +2

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?


9 replies

Badge +9

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

Badge +2

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 

Badge +9

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.

Badge +16

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

Badge +2

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

Badge +2

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 

Badge +9

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?

Badge +2

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

Badge +9

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

Reply