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 multichoice c...
Power Apps
Unanswered

Patching multichoice combo fields into sharepoint list as single line using ForAll

(1) ShareShare
ReportReport
Posted on by 23

Hi Everyone, 

 

I have a combo dropdown fields (cmbHFACS4UH) which I've managed to patch in a text field in my sharepoint list(HFACS) with using ForAll. For each selection chosen in the combo field, it gives me a new line. It works but now I have another combo dropdowns (cmbHFACS4UHV) and I only get the one combo field.

 

My formula is the following:

ForAll(cmbHFACS4UH.SelectedItems;cmbHFACS4UHV;;Patch(HFACS;Defaults(HFACS);{Titel:DataCardValue12.Text;Wer:DataCardValue1.Selected.HFACSWer;unsichereHandlung:DataCardValue19.Text;HFACS1UH:HFACS1;HFACS2UH:HFACS2;HFACS3UH:HFACS3;HFACS4UH:HFACS4}))
 
Do I have to add each combo box into a collection and then patch it? Or is there another way of doing it, so that I get all the values selected from each combobox on a line in my sharepoint list?
 
Thanks in advance KatieK
Categories:
I have the same question (0)
  • Ami K Profile Picture
    15,687 Super User 2024 Season 1 on at

    @Vee1 - if I am reading this correctly, you have a SharePoint list with a Single Line Text or Multiline Text column, and you want to Patch each selected item from a ComboBox into that field as a single record?

  • CU27091340-1 Profile Picture
    23 on at

    Hi @Amik 

     

    Yes that's correct. 

    My current formula with 1 combobox works well:

    ForAll(cmbHFACS4UH.SelectedItems;Patch(HFACS;Defaults(HFACS);{Titel:DataCardValue12.Text;Wer:DataCardValue1.Selected.HFACSWer;unsichereHandlung:DataCardValue19.Text;HFACS1UH:HFACS1;HFACS2UH:HFACS2;HFACS3UH:HFACS3;HFACS4UH:HFACS4}))

     

    But now I've got a 2nd combobox and I'm not quite sure how to add it into the formula.

     

    Thanks for your help!

  • Ami K Profile Picture
    15,687 Super User 2024 Season 1 on at

    @Vee1 - you can use the Concat function to Patch multiple ComboBox selections into a Single Line Text field for a single record. E.g.:

     

    Patch(
     HFACS,
     Defaults(HFACS),
     {
     field1: Concat('Your ComboBox'.SelectedItems,Value,";")
     }
    )
    
  • CU27091340-1 Profile Picture
    23 on at

    Hi @Amik 

    Thanks for your reply. I couldn't get it to work. For some reason it wasn't excepting ;Value. 

     

    I ended up playing and came up with the following:

    ForAll(cmbHFACS4UH.SelectedItems;Patch(HFACS;Defaults(HFACS);{Titel:DataCardValue12.Text;Wer:DataCardValue1.Selected.HFACSWer;unsichereHandlung:DataCardValue19.Text;HFACS1UH:HFACS1;HFACS2UH:HFACS2;HFACS3UH:HFACS3;HFACS4UH:HFACS4}));;

    Hi @Amik 

    Thanks for your reply. I couldn't get it to work. For some reason it wasn't excepting ;Value. 

     

    I ended up playing and came up with the following:

    ForAll(cmbHFACS4EO.SelectedItems;Patch(HFACS;Defaults(HFACS);{Titel:DataCardValue12.Text;Wer:DataCardValue1.Selected.HFACSWer;unsichereHandlung:DataCardValue19.Text;HFACS1UH:HFACS1;HFACS2UH:HFACS2;HFACS3UH:HFACS3;HFACS4UH:HFACS4}))

     

    This worked. Although, im not experienced with Powerapps so maybe this will come back as not an ideal solution over multiple screens.

  • CU27091340-1 Profile Picture
    23 on at

    Sorry this is what I came up with. I forgot the second half in the previous post.

     

    ForAll(cmbHFACS4UH.SelectedItems;Patch(HFACS;Defaults(HFACS);{Titel:DataCardValue12.Text;Wer:DataCardValue1.Selected.HFACSWer;unsichereHandlung:DataCardValue19.Text;HFACS1UH:HFACS1;HFACS2UH:HFACS2;HFACS3UH:HFACS3;HFACS4UH:HFACS4}));;

    ForAll(cmbHFACS4EO.SelectedItems;Patch(HFACS;Defaults(HFACS);{Titel:DataCardValue12.Text;Wer:DataCardValue1.Selected.HFACSWer;unsichereHandlung:DataCardValue19.Text;HFACS1UH:HFACS1;HFACS2UH:HFACS2;HFACS3UH:HFACS3;HFACS4UH:HFACS4}))

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!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 602

#2
WarrenBelz Profile Picture

WarrenBelz 473 Most Valuable Professional

#3
Valantis Profile Picture

Valantis 310

Last 30 days Overall leaderboard