question

keerthanak-3164 avatar image
0 Votes"
keerthanak-3164 asked AllenXu-MSFT commented

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

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.@domain.com
2345 - (checked by user) - Email - cdf.@domain.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







sharepoint-dev
sample.png (5.3 KiB)
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

AllenXu-MSFT avatar image
0 Votes"
AllenXu-MSFT answered AllenXu-MSFT commented

Hi @keerthanak-3164 ,

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("a@domian.com, ", [text box filed])
 If the multiple-selection field contains "2345", set the text field to vlaue concat("b@domian.com, ", [text box filed])
 If the multiple-selection field contains "6789", set the text field to vlaue concat("c@domian.com, ", [text box filed])
 If the multiple-selection field contains "1657", set the text field to vlaue concat("d@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.


image.png (21.0 KiB)
test.gif (54.0 KiB)
· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @AllenXu-MSFT,

Thanks for your response. What I understood from your solution is, we need to set the rule for each and every checkbox. But I will have 'n' number of values associated with my secondary data source.

For your clear understanding let me show one more example and explain in detail:

  1. I have the first data connection and enabled it in the dropdown. Based on the Product code(Dropdown) selection, multi-box will filter and show the respective (company code value using the rules which I applied in it.


  2. I have another data connection (2nd list) and enabled it in multi-box. Based on the Multi-select box value that the user selects, I need to filter the names and display them in the text box by concating the values one by one (as people picker throw error - no match found)

sample example:

131903-sample-2.png


Could you please provide some suggestions to make it dynamically recognize the checked value and pull out the names in the textbox by concating one by one?


Thanks for your help in advance!




0 Votes 0 ·
sample-2.png (11.1 KiB)
AllenXu-MSFT avatar image AllenXu-MSFT keerthanak-3164 ·

Thanks for your clarification. Unfortunately as per my test, it seems to be impossible dynamically recognize the cecked value. I can only achieve this by adding rules one by one manually.

0 Votes 0 ·