locked
People Picker - Limit Multiple selection to 3 people - InfoPath 2010 RRS feed

  • Question

  • Hello,

    I am using people picker in InfoPath 2010. I would like user to add only 3 people and if they add 4th one, don't allow user to submit the form. I checked "Allow multiple selections" in people picker properties and under appearance I selected number 3. it doesn't work.

    Please advise how to achieve this.

    MDeveloper

     


    MDeveloper

    Friday, March 11, 2016 7:30 PM

Answers

  • Hello,

    You can use count function to count people picker values. Later use rules to hide/show error message OR hide/show controls.


    Hemendra:Yesterday is just a memory,Tomorrow we may never see<br/> Please remember to mark the replies as answers if they help and unmark them if they provide no help

    • Marked as answer by MDeveloper_SP Friday, March 18, 2016 6:17 PM
    Tuesday, March 15, 2016 7:32 AM
    Moderator
  • Write a rule on Submit action - Only if textbox value less than or equal to 3 - > Action - Submit.

    If it is greater than 3, dont submit.

    • Marked as answer by MDeveloper_SP Friday, March 18, 2016 6:17 PM
    Thursday, March 17, 2016 3:58 PM

All replies

  • Hello,

    You can use count function to count people picker values. Later use rules to hide/show error message OR hide/show controls.


    Hemendra:Yesterday is just a memory,Tomorrow we may never see<br/> Please remember to mark the replies as answers if they help and unmark them if they provide no help

    • Marked as answer by MDeveloper_SP Friday, March 18, 2016 6:17 PM
    Tuesday, March 15, 2016 7:32 AM
    Moderator
  • Thank you for your quick tip. This was definitely helpful trick. What I actually want is user should not be able to submit if people picker has more than 3 people entries.

    Based on your reply, what I did is - created a text box and put the function "Count(Person)" and added rule that if textbox value is greater than 3 than type the message in same text box under people picker. but that doesn't stop user to submit the entries.

    Any help would be appreciated.


    MDeveloper

    Thursday, March 17, 2016 2:59 PM
  • Write a rule on Submit action - Only if textbox value less than or equal to 3 - > Action - Submit.

    If it is greater than 3, dont submit.

    • Marked as answer by MDeveloper_SP Friday, March 18, 2016 6:17 PM
    Thursday, March 17, 2016 3:58 PM