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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Patching Combo Box Sel...
Power Apps
Answered

Patching Combo Box Selected Items Not Working

(1) ShareShare
ReportReport
Posted on by 43
I have a multi-select combo box called "CB17" within a data card/within a form.  Outside the form is a button with a patch function to take the selected CB17 items and patch to a SP list called "Audit Main".  If CB17 Items is set to:    Choices([@Audit_Main].Address), CB17.SelectedItems,Value     then the patch works. However, users cannot search the CB17 combo box for any key word, meaning search only works in order. For example, user wants to find 123 State Street but can only find if typing 123 and not State or Street. So, I changed the CB17 Items to:    Distinct(Sort(Audit_Main, Address, SortOrder.Ascending), Address)    , which solves the search issue but then patch is unhappy. Patch error says expecting table value but of a different schema.
 
I've tried several patch variations, but nothing works. I've also inserted a second combo box and set its default selected items to CB17 and tried to run the patch using the second combo box (CB17_2), which gives no errors, but no data is passed.
 
In the end, CB17 needs to search strings across available choices and/or patching needs to be set differently to work. Or CB17 Items needs to be changed.  
 
Here's what I've tried for patch:
 
Patch(
        Audit_Main,
        Defaults(Audit_Main),
        {
            'File Name': TI_AuditName.Text,
             BE: CB17.SelectedItems  (Also tried BE: {Id: CB17.Selected.Id, Value: CB17.Selected.Value}
)
Categories:
I have the same question (0)
  • WarrenBelz Profile Picture
    154,496 Most Valuable Professional on at
    Hi @PowerAutomatic​​​​​​​
    The information you have not included is the field type of BE. Also what type of field (Lookup or Choice) is Address ?
  • PowerAutomatic Profile Picture
    43 on at
    Hi Warren, 
     
    BE is a lookup and address is dependent on BE. BE is a lookup to another list called Main. When setting up the "Audit Main" list, I set BE to lookup the "Main" list but then address as an additional column. When BE is selected, it automatically fills in address.   
  • Verified answer
    WarrenBelz Profile Picture
    154,496 Most Valuable Professional on at
    I am still not completely clear on the list and file names, but I will run with the assumption that you are writing back from multi-select combo box CB17 with the Items
    Distinct(
       Sort(
          Audit_Main, 
          Address, 
          SortOrder.Ascending
       ), 
       Address
    )
    to a multi-value lookup field BE. I also have to assume that the BE field is looking up the Main list field also called Address, in which case the Patch would be
    Patch(
       Audit_Main,
       Defaults(Audit_Main),
       {
          'File Name': TI_AuditName.Text,
           BE:
           ForAll(
              CB17.SelectedItems As _Data,
             {
                Value: _Data.Value,
                Id: 
                LookUp(
                   Audit,
                   Address = _Data.Value
                ).ID
             }
          )
      } )
    I will add a further comment that SharePoint Lookup columns are mostly unnecessary with Power Apps and have the potential to cause you unwanted and unneeded complexity and restrictions - I have never used them. It is generally a better idea to get the required field Items directly from the second list with Power Apps and write back to a Text column.
     
    Please click Does this answer your question if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it a Like.
    MVP (Business Applications)    Visit my blog Practical Power Apps    LinkedIn    Buy me a coffee
  • PowerAutomatic Profile Picture
    43 on at
    Warren, TYSM! I would have never gotten that on my own. Ur definitely right on complexity. Wish I would have started off with your suggestion of text. 

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 531 Most Valuable Professional

#2
Haque Profile Picture

Haque 261

#3
Kalathiya Profile Picture

Kalathiya 221 Super User 2026 Season 1

Last 30 days Overall leaderboard