cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
defdames
Level: Powered On

Combo Box Multiple selection values submit

When using a Combo Box control that allows multiple selections it appears in my case that it will not submit two or more values to a sharepoint list when I use the SubmitForm function, only that last one selected.   I have the control conencetd to a sharepoint list and the bakend is a single line of text.  I also customize the combo box so the items field is set to Office365 Search users and I submit the mail field.  Is ther anything I am missing that would prevent this from wokring properly?

2 ACCEPTED SOLUTIONS

Accepted Solutions
Microsoft Employee

Re: Combo Box Multiple selection values submit

Most likely the issue is that you use ComboBox1.Selected property which should be used in "Single selection" mode only. ComboBox1.SelectedItems property should be used for multiple selections but that is not all. SelectedItems returns an array of items and it cannot be directly submitted to a string (or email) field. You will have to concatenate it. Example:

Concat(ComboBox1.SelectedItems,Value,";")

This will create a text field that contains all the selected values, separated by ";".

If you want to test with a default ComboBox control with the default dataset, replace "Value" with Value1".

Microsoft Employee

Re: Combo Box Multiple selection values submit

Correct. You would have to set that to the data card Update field. 

If you get no values then this is probably because the field name is incorrect. Please check the proper field name of your records from your ComboBox controls. Below is an experiment you can do in order to get unblocked:

Create a new application.

Add a ComboBox control and a Label control.

Set Label's Text field to Concat(ComboBox1.SelectedItems,Value1,";")

Select some items in the ComboBox control.

You should see proper values in your Label control. This is because the record field name in the default ComboBox data source is "Value1". In your case, it could be "Value", "Mail", or any other, depending on your data.

7 REPLIES 7
Microsoft Employee

Re: Combo Box Multiple selection values submit

Most likely the issue is that you use ComboBox1.Selected property which should be used in "Single selection" mode only. ComboBox1.SelectedItems property should be used for multiple selections but that is not all. SelectedItems returns an array of items and it cannot be directly submitted to a string (or email) field. You will have to concatenate it. Example:

Concat(ComboBox1.SelectedItems,Value,";")

This will create a text field that contains all the selected values, separated by ";".

If you want to test with a default ComboBox control with the default dataset, replace "Value" with Value1".

defdames
Level: Powered On

Re: Combo Box Multiple selection values submit

Would I enter in this in the Update field of the Datacard?  I did that and all I am getting is ;;; for three values or ;; for two etc. etc.  I should also point out that the Comboboc is getting it's items for a azure SQL table.  I wonder if that has anything to do with it.

 

Microsoft Employee

Re: Combo Box Multiple selection values submit

Correct. You would have to set that to the data card Update field. 

If you get no values then this is probably because the field name is incorrect. Please check the proper field name of your records from your ComboBox controls. Below is an experiment you can do in order to get unblocked:

Create a new application.

Add a ComboBox control and a Label control.

Set Label's Text field to Concat(ComboBox1.SelectedItems,Value1,";")

Select some items in the ComboBox control.

You should see proper values in your Label control. This is because the record field name in the default ComboBox data source is "Value1". In your case, it could be "Value", "Mail", or any other, depending on your data.

defdames
Level: Powered On

Re: Combo Box Multiple selection values submit

I just tried that and as you can see by my screenshot attachement I am getting blanks.  Im at a loss

Microsoft Employee

Re: Combo Box Multiple selection values submit

Interesting. I see a different result (see the attached picture). What is your default language? Can you try a different separator (comma or space for example)?

Highlighted
Microsoft Employee

Re: Combo Box Multiple selection values submit

I see the issue now. The formula should be Concat(ComboBox1.SelectedItems,Value1,";")

Note that after the SelectedItems, there has to be comma, not period (dot).

defdames
Level: Powered On

Re: Combo Box Multiple selection values submit

Thank youi very much for your help and patience

Helpful resources

Announcements
firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

SecondImage

Power Platform Summit North America

Register by September 5 to save $200

Users Online
Currently online: 78 members 5,349 guests
Please welcome our newest community members: