Skip to main content

Notifications

Community site session details

Community site session details

Session Id : KPpAOPXXQbLfPP2zDVpTNT
Power Apps - Building Power Apps
Answered

Patch a multi-select combo box to a nested table within a collection

Like (0) ShareShare
ReportReport
Posted on 12 Feb 2025 22:30:18 by 4

I'm pulling my hair out for 2 days now and I have no idea if what I am wanting to do is feasible.

I have a collection that grabs data from a SP list called Skills. One of the columns called Workgroup will be used to store values from a multi-select combo box. So I created it as a table.

This is what I did

ClearCollect(colSkillsFoH, AddColumns(ShowColumns(Filter(Skills, Portfolio.Value = "Front of House"), ID, Title, Portfolio), Workgroup, Table({Value: ""})));

I have then added a multi-select combo box into my gallery. On the OnSelect property of the combo box I need to be able to patch or update the selected items from the combo box back to the Workgroup table column that I have created in my collection but to no avail.

Patch(colSkillsFoH, LookUp(colSkillsFoH, Title = ThisItem.Title),
    {Workgroup:{Value: ThisItem.Value}})

It is failing because it expects that the Workgroup column contains a table but is seeing a Record (which makes sense).

I also tried it this way but it's failing on Value. It's also saying that it's expecting a Table value but of a different schema.

Patch(colSkillsFoH, LookUp(colSkillsFoH, Title = ThisItem.Title),
    {Workgroup: Collect(LookUp(colSkillsFoH, Title = ThisItem.Title).Workgroup, {Value: ThisItem.Value})})

How do I get those values to be stored in a table? Is it possible?

My plan is once those values are patched. I will then patch the entire collection to another SP list where the Workgroup column is a multi-select choice column.

Seriously, I can do this with one value but dealing with multi-select values is driving me nuts!

  • WarrenBelz Profile Picture
    146,883 Most Valuable Professional on 13 Feb 2025 at 05:09:36
    Patch a multi-select combo box to a nested table within a collection
    If you are triggering the Patch OnChange of the Combo Box, you can do this.
    Patch(
       colSkillsFoH, 
       LookUp(
          colSkillsFoH, 
          Title = ThisItem.Title
       ),
       {Workgroup: Self.SelectedItems}
    )
     
  • TerriyakiIR Profile Picture
    4 on 13 Feb 2025 at 04:28:06
    Patch a multi-select combo box to a nested table within a collection
    Thanks so much! That helped. I was trying this bit out 
    {Workgroup: ComboBoxName.SelectedItems}
    yesterday and for some reason it wouldn't work. There could be a combo of factors as I was trying out too many stuff to the point my app kept crashing lol. I removed my brackets for [ThisItem.Workgroup] in the DefaultSelectedItems property which was causing it to fail (thanks for point that out). And I have to make sure that I put the patch command on the OnChange property as well.
  • Verified answer
    WarrenBelz Profile Picture
    146,883 Most Valuable Professional on 12 Feb 2025 at 23:03:22
    Patch a multi-select combo box to a nested table within a collection
    If you have this in your Patch, assuming the output of your Combo Box is .Value, you are running this from an icon/button inside the gallery and using your Combo Box name
    Patch(
       colSkillsFoH, 
       LookUp(
          colSkillsFoH, 
          Title = ThisItem.Title
       ),
       {Workgroup: ComboBoxName.SelectedItems}
    )
    you can also have the DefaultSelectedItems of your Combo Box
    ThisItem.Workgroup
    and see the result as soon as it is Patched
     
    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

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

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Power Apps - Building Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 44 Most Valuable Professional

#2
mmbr1606 Profile Picture

mmbr1606 41 Super User 2025 Season 1

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 36

Overall leaderboard
Loading started