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 / Patch new record(s) ba...
Power Apps
Answered

Patch new record(s) based on a combo box?

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Can you create new Sharepoint records based on a combobox?

 

Patch(ListName,

 

{Task Name:Dropdown1.selected,

Person:combo_box1.selecteditems.result,

Department:dropdown4.selected})

 

 

the person value is a dropdown list of names on sharepoint

Categories:
I have the same question (0)
  • Verified answer
    BCLS776 Profile Picture
    8,994 Moderator on at

    You can use a ComboBox to drive a Patch(), but keep in mind SelectedItems is a table with potentially multiple entries - your Patch() needs to handle this. Syntax will look more like:

    ForAll(combo_box1.SelectedItems As aItem,
     Patch(ListName,Defaults(ListName),
     {
     TaskName: Dropdown1.Selected.Text,
     Person: aItem.Result // Assuming this is a single line of text column
     Department: Dropdown4.Selected.Text
     }
     )
    )

    Hope that helps,

    Bryan

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

    Yes you can, but depends on your SharePoint list column settings. If it's a person field, then you'll need to allow multiple people on the column. I can't remember if powerapps will convert that or not automatically, but you'll want to make sure that's enabled on the column, then update the schema / save reload your app, then use the combobox.selecteditems only not .results, it should respect the multiple selection. 

     

    If it's another column type then you'll have to use concat etc. to concatenate the .selecteditems from the table as suggested in previous reply.

  • v-qiaqi@microsoft.com Profile Picture
    Microsoft Employee on at

    Hi @marc2510,

    Do you want to save multi select Combo Box items to Person column?

    Could you please tell me that if the Person column is a Text column in the SP list?

     

    I assume that the Person column is a single line of text column, please modify your formula as below:

    Patch(ListName,
    
    {Task Name:Dropdown1.selected,
    
    Person:Concat(combo_box1.SelectedItems,Result,",")
    
    Department:dropdown4.selected})
  • Stacey_T Profile Picture
    60 on at

    Is it possible to have the Patch function create the number of records equivalent to the number of selections in the combobox, i.e. one new record per selection?  The solution seems to put my multiple selections into one row/one field.  

    ForAll(combobox.SelectedItems As alias, 
    Patch(SP_list, Defaults(SP_list),
    {alias_test_field: alias.Result}));

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 326 Most Valuable Professional

#2
11manish Profile Picture

11manish 168

#3
sannavajjala87 Profile Picture

sannavajjala87 75 Super User 2026 Season 1

Last 30 days Overall leaderboard