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

Patch issues combobox

Hello,

 

Unfortunately it is not possible to select multiple values in a dropdown control. However I have tried to use combo boxes to multi select options. Now I have come accross a problem that I cannot solve and I have wandered around the forums a lot lately. 

 

In essence I am trying to make an advanced form which people can fill in and which is saved to a sharepoint list database. Patching single select dropdown controls have not been a problem for me with this type of syntax: 

 

Country(Column name in SP list):{'@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
Id:1,
Value:DrpCountry(dropdown control).Selected.Value}

 

However if I would for example ask to which countries someone has been in the last year I want them to pick multiple options. Combobox offers this multiple selection but if I try to use the patch syntax for this it won't create a new entry in the Sp list. It gives an unknown error. 

 

Anyone got better ideas on how to patch multiple selections in a new entry on a sharepoint list? I would be glad to hear so.  

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Patch issues combobox

Hi @Sime,

 

Could you please share a bit more about your app's configuration?

Further, could you please show a bit more about the Country column in your SP list? Is it a Choice type column which has allowed multiple selections?

 

I assume that Country column is a Choice type column in your SP list, which has allowed multiple selections. I have made a test on my side, please take a try with the following workaround:3.JPG

 

4.JPG

 

 

Set the OnChange property of the Combo box control (On my side, it is DataCardValue3) to following formula:

Clear(CountryTable);
ForAll(
DataCardValue3.SelectedItems,
Collect(
CountryTable,
{
'@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
Id:CountRows(CountryTable),
Value:Value
}
)
)

Set the OnSelect property of the "Submit" button to following formula:

Patch(
'20180720_case6',
Defaults('20180720_case6'),
{
Title:DataCardValue1.Text,
EmployeeName:DataCardValue2.Text,
Country:CountryTable
}
)

Note: The '20180720_case6' represents the SP list data source within my app. The Country is a Choice type column in my SP list , which allows multiple selections.

 

The GIF image as below:Test1.gif

 

 

 

 

 

Best regards,

Kris

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
Community Support Team
Community Support Team

Re: Patch issues combobox

Hi @Sime,

 

Could you please share a bit more about your app's configuration?

Further, could you please show a bit more about the Country column in your SP list? Is it a Choice type column which has allowed multiple selections?

 

I assume that Country column is a Choice type column in your SP list, which has allowed multiple selections. I have made a test on my side, please take a try with the following workaround:3.JPG

 

4.JPG

 

 

Set the OnChange property of the Combo box control (On my side, it is DataCardValue3) to following formula:

Clear(CountryTable);
ForAll(
DataCardValue3.SelectedItems,
Collect(
CountryTable,
{
'@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
Id:CountRows(CountryTable),
Value:Value
}
)
)

Set the OnSelect property of the "Submit" button to following formula:

Patch(
'20180720_case6',
Defaults('20180720_case6'),
{
Title:DataCardValue1.Text,
EmployeeName:DataCardValue2.Text,
Country:CountryTable
}
)

Note: The '20180720_case6' represents the SP list data source within my app. The Country is a Choice type column in my SP list , which allows multiple selections.

 

The GIF image as below:Test1.gif

 

 

 

 

 

Best regards,

Kris

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Highlighted
Sime
Level: Powered On

Re: Patch issues combobox

That helped a lot. Thankyou Kris!

Helpful resources

Announcements
Better Together’ Contest Finalists Announced!

'Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

thirdimage

Power Apps Community User Group Member Badge

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

sixthImage

Join THE global Microsoft Power Platform event series

Attend for two days of expert-led learning and innovation on topics like AI and Analytics, powered by Dynamic Communities

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

thirdimage

Microsoft Business Applications Virtual Launch

Join us for the Microsoft Business Applications Virtual Launch Event on Thursday, April 2, 2020, at 8:00 AM PST.

thirdimage

Community Summit North America

Innovate, Collaborate, Grow - The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors
Users online (11,213)