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

Patch Combobox to SharePoint Choice Coloum

Looking for some help please.

 

I’m trying to patch a combo box to a SharePoint Choice Column (Checkbox) but can’t seem to get anywhere. I can patch to a simple choice column, however after reading tutorials and videos on YouTube for combobox I’ve hit a dead end. Ive highlighted in red the patch string i found online, i think im nearly there, but need the forum helpCombobox.png.

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Patch Combobox to SharePoint Choice Coloum

Hi @Mac,

Is the Products 2 column a Choice type column (which enables multiple options) within your SP list?

Do you want to save a Combo box selected values/options into the Products 2 column of your SP list?

Further, could you please share more details about the error message with the formula that you provided?

 

I have made a test on my side, and don't have the issue that you mentioned. The screenshot as below:11.JPG

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

 

Patch(
'20181015_case13',
Defaults('20181015_case13'),
{
Title:"PowerAppsTest2",
FruitChoice:ForAll(ComboBox1.SelectedItems,{'@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",Value:Value})
}
)

On your side, you should type following:

 

 

ForAll(
    CallBack,
    Patch(
        'Call Back Form',
        Defaults('Call Back Form'),
        {
          Customer_x0020_Name: CustomerName,
          Title: Number,
          ...
          Products_x0020_2: ForAll(
DataCardValue17.SelectedItems,
{
'@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
Value: Value
}
) } ) )

Or

ClearCollect(
    ChoiceCollection,
    ForAll(DataCardValue17.SelectedItems,{'@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",Value:Value})
);
ForAll(
    CallBack,
    Patch(
        'Call Back Form',
        Defaults('Call Back Form'),
        {
          Customer_x0020_Name: CustomerName,
          Title: Number,
          ...
          Products_x0020_2: ChoiceCollection
        }
    )
)

 

 

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

4 REPLIES 4
Super User
Super User

Re: Patch Combobox to SharePoint Choice Coloum

Hi @Mac,

my simple suggestion is to get rid of choice columns in PowerApp by either changing the column type in SharePoint to single line of text or adding a calculated column with the choice column selected and using that instead.

Community Support Team
Community Support Team

Re: Patch Combobox to SharePoint Choice Coloum

Hi @Mac,

Is the Products 2 column a Choice type column (which enables multiple options) within your SP list?

Do you want to save a Combo box selected values/options into the Products 2 column of your SP list?

Further, could you please share more details about the error message with the formula that you provided?

 

I have made a test on my side, and don't have the issue that you mentioned. The screenshot as below:11.JPG

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

 

Patch(
'20181015_case13',
Defaults('20181015_case13'),
{
Title:"PowerAppsTest2",
FruitChoice:ForAll(ComboBox1.SelectedItems,{'@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",Value:Value})
}
)

On your side, you should type following:

 

 

ForAll(
    CallBack,
    Patch(
        'Call Back Form',
        Defaults('Call Back Form'),
        {
          Customer_x0020_Name: CustomerName,
          Title: Number,
          ...
          Products_x0020_2: ForAll(
DataCardValue17.SelectedItems,
{
'@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
Value: Value
}
) } ) )

Or

ClearCollect(
    ChoiceCollection,
    ForAll(DataCardValue17.SelectedItems,{'@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",Value:Value})
);
ForAll(
    CallBack,
    Patch(
        'Call Back Form',
        Defaults('Call Back Form'),
        {
          Customer_x0020_Name: CustomerName,
          Title: Number,
          ...
          Products_x0020_2: ChoiceCollection
        }
    )
)

 

 

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

Nate1
Level: Power Up

Re: Patch Combobox to SharePoint Choice Coloum

Hello @v-xida-msft ,

In this example:

Patch(
'20181015_case13',
Defaults('20181015_case13'),
{
Title:"PowerAppsTest2",
FruitChoice:ForAll(ComboBox1.SelectedItems,{'@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",Value:Value})
}
)

Is there a way to concatenate an additional value outside the ForAll statement? For example, I have an "Other" option in the combobox which allows text input (OtherInput). So I would want to do something like:

FruitChoice:ForAll(ComboBox1.SelectedItems,{'@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",Value:Value})&", "Value: OtherInput.Text

 

This doesn't work, but I wanted to see how I might do this.

 

thanks

 

 

Highlighted
nizam1011
Level: Powered On

Re: Patch Combobox to SharePoint Choice Coloum

I had a similar issue.
I need to paste multiple selected items in a combobox to a sharepoint list text column.
This is how I did this inside Patch:

Patch(DestinationList,{TextColum: Concat(ComboBox.SelectedItems,VariableValue,", ")}

Concat(ComboBox.SelectedItems,VariableValue,", ") 

This separates the items selected in combobox with ", " and converts the whole into text and allows me to patch the Sharepoint list.

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 (9,761)