Skip to main content
Nintex Community Menu Bar

How to compare two people picker fields on the form

  • August 29, 2017
  • 5 replies
  • 32 views

Forum|alt.badge.img+5

How to compare people picker fields on the form?

For example if people picker1 is equal to people picker 2 then make field 2  mandatory ( field 2  mandatory rule written on the form).

Thanks in Advance!

5 replies

Forum|alt.badge.img+16

Add a rule on field 2 as follows:

ensure you use Named Controls (in example above PP1 and PP2 are the named controls of my two people picker fields)


Forum|alt.badge.img+14
  • Scholar
  • August 29, 2017

equals() compares just strings and is not reliable on people picker controls - How to comapre two people picker controls? 

I recommend to use dedicated userEquals()


Forum|alt.badge.img+16

oh well it seemed to work fine when I just tested it.


Forum|alt.badge.img+8
  • August 30, 2017

I believe you should use this function userProfileLookup() in the same equal() function above to get the display name string then it will work 

 userProfileLookup("domainlogin", "InternalPropertyName") 

It will be something like this

equal(userProfileLookup(pp1, "PreferredName"), userProfileLookup(pp2, "PreferredName"))


Forum|alt.badge.img+14
  • Scholar
  • August 30, 2017

1. user's display name is not unique user's identifier. you can have several users with the same display name and different logins, and vice versa single user might have several difference accounts with the same display name.

2. userProfileLookup() works only on SP Server and above editions.