RE: Autopopulate People picker with mutiple emails from existing data connection based on Muti-Select list box selection- Infopath

I have been using InfoPath 2013 to create a list form. I need some help in SharePoint InfoPath auto-populating people picker with multiple-person email.

explaining the requirement in detail:

  • My form has one dropdown (“product”) which is the primary field of my form. Users will select “product” from this dropdown. I have one data connection with products and company code and mapped it into the dropdown list.

  • I applied the necessary rules which will populate the respective “Company codes” (multi-select box) based upon product value in the dropdown.

    Eg: Product (Drop Down): ABC
    Company Code (Muti-select listbox- checkbox) – 1234

  • once populated, the user needs to select the required company codes
    in the multi-select list box.

  • Based on the company code selection done, I need to populate the people picker with Email. Already I have the company code with respective names(Emails) mapping and enabled it as another data connection for this multi-select box at the back-end.

  • I have applied the rule for the below step in the multi-select box for populating the people picker fields using the secondary connection. • The people picker field auto-populates correctly with the correct user name as per the data connection. But only one name is shown at the time of selection in multi-box. I need to show all the names whatever is being selected by the “Company code” field checkbox by the user (one by one) as shown below:

the output which got as per my working in infopath

What i need as Expected output: It should be like this if the user selects the first two options in the muti- list box:

Eg: Product (Drop Down): ABC
Company Code (Multi-select Listbox- checkbox) – 1234 – (checked by user)
2345 – (Checked by user)

                                  (1234 email mapping from my data connection)
      Email- People Picker-       (2345 email mapping from my data connection)

I got stuck in the above step. If this cannot be done in the people picker field, Please suggest any workaround to achieve the same in the text box or any workflows at least.