I have another question, how to add a rule on people picker?
for example if I choose Individual Nominee , the people picker field should allow user to all only one person.
If I choose Team Nomination then the people picker should allow multiple users names.
Thanks In Advance
Solved! Go to Solution.
it's not possible to restrict people picker control to dynamically change at runtime number of allowed entries.
you can however write a validation rule that could check whether single person or team is selected along with number of entries in people picker control.
have a look on following post how to determine number of entreis in people picker control https://community.nintex.com/message/62289-re-people-picker-field-validation?commentID=62289#comment...
While you cannot restrict the Maximum Entries value on the control during runtime, you can certainly validate against it.
If you have two (2) controls
Maximum Entries: 25
CSS class: myPeoplePicker
You'll be able to use the following rule to throw a validation error when you have selected Individual on the Choice Control and more than one (1) entree for the People Picker Control.
(target_group === "Individual" && NWF$(".myPeoplePicker .ip-item").length > 1);
The results should be as follows:
Individual selection + more than (1) entry will fail.
But a Team selection passes the test
I hope this helps.
And is there any particular strange behavior that is happening other than that it is no longer working?
As in, it works with Individual but not Group, or the other way around, or neither?
No!! I have applied it only for individual nominee( like if user click individual and put more than 1 person in people picker then the validation rule should be applied).
Now, the form is not validating any more.
The strange thing I notice is.. when I figured the validation rule is not working any more I tried to pull the older version of the form ( where my validation rule for the people picker field is working) and checked it is not working either!
Please let me know if I explained clearly.