locked
How do you display multiple names in Infopath form derived from a SharePoint list? RRS feed

  • Question

  • I have a SharePoint 2010 list, which contains a People/Groups field that allows for multiple values. When building my Infopath 2010 form, i'm trying to set a rule that will display all of the names from the list, onto my Infopath form, based on a choice.

    For example:
    Type: (Choice field: Internal/External)
    Field: -displays all names

    When the user chooses Internal, I want the values found in SharePoint List B > PeoplePicker field to be displayed on the form. If they choose External, i want a different set of values displayed.

    The problem is, I can only get the first user's display name, but not the other 15 people in the people picker field.

    I've seen this question asked a million times, but i cannot find an answer to the problem. Can you display multiple names from a sharepoint people/groups field on an infopath form? If the answer is Yes, how??


    SPNoob

    Tuesday, May 14, 2013 6:08 PM

Answers

  • Hi SPNoob,

    I think that you are using an action rule to get and set the people field to the field used to display all names. In this way, we can only get the first eligible item.

    Please use following solution instead.

    1. Add a section control to the form template.
    2. In Fields pane, switch to the second data source, extend the dataFields group, then right click the “d:SharePointListItem_RW” repeating group and display all fields as a “Repeating table” to the form within the section control we added in step1.
    3. Remove the other fields and only left the people fields in the repeating table.
    4. Add a formatting rule to the repeating table, add condition similar like this.
      If you want to display the name which its ID field = 3, then the action should be
      If ID not equal to “3”, then hide this control.
    5. Another formatting rule to the section control that we created in step1.
      If choice field = External, hide this control
    6. Similar steps with Step1 ~ 5 to hide/display the other set of field, we need another section with a repeating table with that set of field.

    Let me know if you have any further question.

    Thanks & Regards,
    Emir


    Emir Liu
    TechNet Community Support

    • Marked as answer by SPNoob555 Wednesday, May 15, 2013 1:49 PM
    Wednesday, May 15, 2013 5:39 AM

All replies

  • Hi SPNoob,

    I think that you are using an action rule to get and set the people field to the field used to display all names. In this way, we can only get the first eligible item.

    Please use following solution instead.

    1. Add a section control to the form template.
    2. In Fields pane, switch to the second data source, extend the dataFields group, then right click the “d:SharePointListItem_RW” repeating group and display all fields as a “Repeating table” to the form within the section control we added in step1.
    3. Remove the other fields and only left the people fields in the repeating table.
    4. Add a formatting rule to the repeating table, add condition similar like this.
      If you want to display the name which its ID field = 3, then the action should be
      If ID not equal to “3”, then hide this control.
    5. Another formatting rule to the section control that we created in step1.
      If choice field = External, hide this control
    6. Similar steps with Step1 ~ 5 to hide/display the other set of field, we need another section with a repeating table with that set of field.

    Let me know if you have any further question.

    Thanks & Regards,
    Emir


    Emir Liu
    TechNet Community Support

    • Marked as answer by SPNoob555 Wednesday, May 15, 2013 1:49 PM
    Wednesday, May 15, 2013 5:39 AM
  • Hi SPNoob,

    I think that you are using an action rule to get and set the people field to the field used to display all names. In this way, we can only get the first eligible item.

    Please use following solution instead.

    1. Add a section control to the form template.
    2. In Fields pane, switch to the second data source, extend the dataFields group, then right click the “d:SharePointListItem_RW” repeating group and display all fields as a “Repeating table” to the form within the section control we added in step1.
    3. Remove the other fields and only left the people fields in the repeating table.
    4. Add a formatting rule to the repeating table, add condition similar like this.
      If you want to display the name which its ID field = 3, then the action should be
      If ID not equal to “3”, then hide this control.
    5. Another formatting rule to the section control that we created in step1.
      If choice field = External, hide this control
    6. Similar steps with Step1 ~ 5 to hide/display the other set of field, we need another section with a repeating table with that set of field.

    Let me know if you have any further question.

    Thanks & Regards,
    Emir


    Emir Liu
    TechNet Community Support

    Brilliant!  Thank you so very much for taking the time to answer my question. I appreciate the deailed reply. We followed your instructions and it works perfectly.

    Thanks again,
    Dianna


    SPNoob

    Wednesday, May 15, 2013 1:50 PM