RE: Autopopulate textbox with mutiple values from existing data connection based on selection in Muti-Select list box - Infopath

keerthana k 1 Reputation point
2021-09-13T14:51:25.217+00:00

I have been using InfoPath 2013 to create a list form. I need some help in the SharePoint InfoPath auto-populating text box 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
2345
6789

  • 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 text box 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 textbox 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 mutlibox by the user (one by one) as shown below:

131616-sample.png

What I need as Expected output: It should be like this if the user selects the first two options in the muti- list box then concat and display the email into text box as show below:

Eg: Product (Multi-select Listbox- checkbox) - 1234 - (checked by user) - Email - abc.@keyman .com
2345 - (checked by user) - Email - cdf.@keyman .com
6789

I got stuck in the above step. Please suggest any workaround to achieve the same in the text box or any workflows at least

Microsoft 365 and Office SharePoint Development
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Allen Xu_MSFT 13,861 Reputation points
    2021-09-14T08:01:47.77+00:00

    Hi @keerthana k ,

    As per your description, my understanding is that you want to pre-populate a text box field based on a multiple-selection field, right? If yes, please add rules like below to the multiple-selection field. For example:

    If the multiple-selection field contains "1234", set the text field to vlaue concat("******@domian.com, ", [text box filed])  
    If the multiple-selection field contains "2345", set the text field to vlaue concat("******@domian.com, ", [text box filed])  
    If the multiple-selection field contains "6789", set the text field to vlaue concat("******@domian.com, ", [text box filed])  
    If the multiple-selection field contains "1657", set the text field to vlaue concat("******@domian.com, ", [text box filed])  
    ...  
    

    131892-image.png

    Test reuslt on my end.
    131893-test.gif


    If an Answer is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.