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!
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)
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()
oh well it seemed to work fine when I just tested it.
I believe you should use this function userProfileLookup() in the same equal() function above to get the display name string then it will work
It will be something like this
equal(userProfileLookup(pp1, "PreferredName"), userProfileLookup(pp2, "PreferredName"))
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.
Retrieving data ...