I want to get the Managers Display Name displayed in my Form. What I have tried so far. I created a variable “v_manager” with the Formula userProfileLookup(RequesterCtrl, "Manager") …RequsterCtrl is a PeoplePicker. Then I created a CalculatedValue “cv_manager” and applied the Formula userProfileLookup(v_manager, "PreferredName"). The result was nothing …no value will be displayed. What am I doing wrong?
Solved! Go to Solution.
I used the this nested formula with a Calculated Value control and it worked:
userProfileLookup(userProfileLookup(Associate, "Manager"), "PreferredName")
here is a post here with an example that shows how to get the display name for the manager instead of the login id. Re: How to autofill a Nintex form with SharePoint user profile information?
I agree with Enrico on that. Also, just to test, you could remove the outer function for the work email and use just the inside function to get the manager's id. It is possible that the manager attribute is there, but the "WorkEmail" isn't, or maybe it is called something else. It would be good to remove that variable while you troubleshoot.
When I create functions like this, it never works for my admin account because there is no manager in AD, so I have to remember to check it with my user account. So, you will also want to make sure that isn't also a factor.
Thanks Enrico and Brian.
I have checked and you both are right. My manager user profile is empty, that's the reason I got blank when retrieved. I noticed that user profile of my manager is blank because she do not logon to the TeamSite before and I am able to retrieve her user profile after she accessed the TeamSite. In short, only user profile for those users who access the TeamSite before are able to retrieve.
userProfileLookup(userProfileLookup(Current User,"Manager"),"WorkEmail") workable for me. Thanks for the great help..~!
Depending on when you're form is shown you could get the manager directly from within the active directory in a workflow after an item was created. You can then store it in a variable and show the managers display name in all forms afterwards.
While this won't help you for the initial start form it might help you for all the other forms within the same process.