web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Issue with Patching Co...
Power Apps
Unanswered

Issue with Patching Combobox

(0) ShareShare
ReportReport
Posted on by 181

Hi all,

I am trying to patch a Combobox back to my SharePoint list. Since I allowed multiple selections, I started getting the error message
My list name is "Harris Document Testing 5000 records", and the Combobox name is ComboBox2.

Patch(
 'Harris Document Testing 5000 records',
 {
 Title: ComboBox2.Selected.Title,

 Lookup: {
 '@odata.type': "#Microsoft.Azure.Connector.SharePoint.SPListExpanded.Reference",
 Id: LookUp(LookUpFieldResponse, ComboBox2.Selected.Title).Id,
 Value: LookUp(LookUpFieldResponse, ComboBox2.Selected.ID)
 } 
 }
);

  Capture5.PNG

Categories:
I have the same question (0)
  • cwebb365 Profile Picture
    3,294 Most Valuable Professional on at
    Should just be able to use lookup: combobox2.selecteditems unless the drop down isn't connected to the column choices then you'll have to use a for all. 
  • Harris021 Profile Picture
    181 on at

    @cwebb365 thanks for ur message, can please kindly let me know your solution to my scenario.

  • cwebb365 Profile Picture
    3,294 Most Valuable Professional on at

    Gave you the solution. Use choices(test 5000 list,lookup) for items of the combobox2 and use combobox2.selecteditems in your patch. Make sure you have allow multiples set on the lookup column on the share point list as well. Should all just work.  

  • Harris021 Profile Picture
    181 on at

    the moment I turn the Allow multiple selection on in SharePoint i get the this error message.

    Capture7.PNG

  • cwebb365 Profile Picture
    3,294 Most Valuable Professional on at

    Then you need to change your combo box to also use multi selection.  

  • Harris021 Profile Picture
    181 on at

    Harris021_0-1699753538838.png

    I have done that. 😞 and still the same issue

  • cwebb365 Profile Picture
    3,294 Most Valuable Professional on at

    Well your items coming in is from a totally different data source so you’ll have to patch in with a forall. I’ll go pull one of my examples here after I get my kid to bed 

  • Harris021 Profile Picture
    181 on at

    @cwebb365 Thanks mate, its working if I just select a single record, its just I cant make it working with selecting multiple items

    Capture8.PNG

  • cwebb365 Profile Picture
    3,294 Most Valuable Professional on at

    Should be something like this in the Patch for Lookup: .

    Lookup: ForAll(
    ComboBox2.SelectedItems,
    {
    '@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
    Id: ID,
    Value: Title
    }

    Your Default should be blank, and your DefaultSelectedItems something like this: 

    ForAll(ThisItem.Lookup,{
    ID:Id,
    Title:Value})

  • cwebb365 Profile Picture
    3,294 Most Valuable Professional on at

    You might have to use your logic for the ID and Value vs. what I have thou, but that's basically the format, you just want to pull in ForAll( Combobox2.SelectedItems which loops through the ones in the combobox and writes them for the lookup. And then the Loop in defaultselected is the same way but pulling all the items in the lookup and selecting them in the combobox. 

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 796 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 327 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard