Skip to main content
Nintex Community Menu Bar

Can I lookup a person in a table based on a people picker drop down?

  • February 22, 2018
  • 4 replies
  • 32 views

Forum|alt.badge.img+7

I have a table called "Requests" with a person field called [Requester]. 

I have a second table called "Employees" with a person field called [Employee] and another field called [Team].

The fields on my form are named the same. 

On my Nintex form, Requester is a people picker.  Once the person is selected, I would like to do a Lookup on the Employees table to pick up the Team.

I tried to use this Calculated Value -- lookup("Employees","Employee",Requester,"Team"), but I just get a blank.

Does anyone have any idea how to do this?

P.S.  The team name stored in the table is not available in the userprofile.

4 replies

Forum|alt.badge.img+7
  • Author
  • February 24, 2018

Any ideas?


Forum|alt.badge.img+14
  • Scholar
  • February 28, 2018

person or group field works like a lookup field.

so you can query its value by a sharepoint user ID like

lookup('Employees','Employee',EmployeeUserID,'Team',false,'Lookup')

or by sharepoint user Display name like

lookup('Employees','Employee',EmployeeDisplayName,'Team')

the main problem here is that people or group form control doesn't resolve to either of these two values, so you can not directly use it as an input to lookup() function.

if you have running profile services, you could use userProfileLookup() function to get (eg) employee display name.

if you do not, you will have to find other way how to determine one of these values, but it will need additional javascript code.


Forum|alt.badge.img+7
  • Author
  • April 12, 2018

Thank you for your reply.  Would you, or anyone, happen to have java code so I can input a name via a peoplepicker, and lookup that name in a list (Employees), so I can reference associated data such as team, role, etc?


Forum|alt.badge.img+14
  • Scholar
  • April 13, 2018

if you have only single entry in PP field you can get selected user's display name with following code

NWF$('#' + jsvarPP).siblings('.ip-item').find('.ip-item-content').text();

so you can wrap it into a function and then reference the function in your lookup