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

New Responsive: Get Manager name (not loginID) via profile lookup?

Hello all,

 

I'm trying to show the Manager Name (PrefferedName) on a New Responsive form. I'm able to get the LoginID using: 

 

userProfileLookup([Form].[Employee],"Manager") -- Note "Employee" is a people picker form field. 

This returns a value like this: i:0#.f|membership|email@address.com

 

I then tried to pump that into another user profile lookup: 


userProfileLookup([Form].[ManagerLoginID],"PreferredName") -- Note "ManagerLoginID" is the variable capture from above. 

But that returns no result on the preview, or the published form. Is there anyway to get to the Manager PreferredName (or any other property, like email) using variables? 

 

Thank you.

Labels: (1)
Tags (1)
0 Kudos
Reply
3 Replies
v-tmasenko
Nintex Newbie

Re: New Responsive: Get Manager name (not loginID) via profile lookup?

Euan has an excellent video detailing how to figure out the case sensitive user profile properties to reference in Nintex Forms for O365: https://www.youtube.com/watch?v=mBr1xrmpv9U

After reviewing the user profile properties in https://YourDomain-admin.sharepoint.com/_layouts/15/TenantProfileAdmin/MgrProperty.aspx?ProfileType=...
I don't see the PreferredName property anywhere.

However the Manager's name can be access using the following two steps:
1) Create a variable with following definition:
UserProfileLookup(userProfileLookup([Context].[Current user email],"Manager"),"FirstName")
+ " " +
UserProfileLookup(userProfileLookup([Context].[Current user email],"Manager"),"LastName")

2) Assigned the variable to a form control (like a Label or Text - Short).
You'll see the result only when executing a published form.
0 Kudos
Reply
mikeboggs23
Nintex Newbie

Re: New Responsive: Get Manager name (not loginID) via profile lookup?

I apprecaite you taking the time to reply. A couple of notes (remember that the manager property returns this format: i:0#.f|membership|emailaddress@domain.com): 

  1. PrefferdName does work as a propery. If I hardcode somethign like this it works fine: 
    userProfileLookup("emailaddress@domain.com","PreferredName"). 
  2. Even when using FirstName or LastName, this still does not work when using a nested userprofile lookup like your example. I entered this exactly: userProfileLookup(userProfileLookup([Context].[Current user email],"Manager"), "FirstName") and get no result. 
  3. IF I hardcode it like this: UserProfileLookup(userProfileLookup("i:0#.f|membership|emailaddress@domain.com","Manager"),"FirstName") it WORKS fine. SO it seems to only not work when the context of the nested userProfileLookup is dynamic. 

Given number 3, it seems more like a bug. 

0 Kudos
Reply
mikeboggs23
Nintex Newbie

Re: New Responsive: Get Manager name (not loginID) via profile lookup?

Euan's video sorted me out.  There are some quirks when using variables that were messing me up.

 

As I wrote on a comment on that video: " Using the "context" of current user works for your variable example, but not the "context" of a people picker. I'm guessing variables don't update dynamically, only on load."

 

Also, the variable example in my number 2 above works in published form, but not in preview. My appologies for claiming it didn't work. 

 

Hopefully this thread will help others in the future. Step 1: WATCH EUAN'S VIDEO! Smiley Happy

Reply