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 Data to a ShareP...
Power Apps
Unanswered

Patch Data to a SharePoint List

(0) ShareShare
ReportReport
Posted on by 74

I have a form and a gallery whose data I would like submitted to a specific list. The data from the form is submitted successfully but I can't get around to having the data on the gallery submitted to the specific columns on the list.

 

Any help on this?

Categories:
  • timl Profile Picture
    37,287 Super User 2026 Season 2 on at

    Hi @momureithi 

    There are some formula examples in this post that show how to patch the items in a gallery to a data source using the ForAll function.

    https://powerusers.microsoft.com/t5/Building-Power-Apps/Patch-all-items-in-Gallery/td-p/66288

    Maybe that might help. If not, if you could provide more details as to how your gallery and list is set up, that would help us provide more specific answer.

  • v-albai-msft Profile Picture
    Microsoft Employee on at

    Hi @momureithi ,            

    Could you tell me which data source the gallery is connected to? A collection or other data sources?

    For patching data to a SharePoint list, assume that:

    1. Your Gallery is to display a collection, and the collection is reading data from your SP list.

    2. You want to update the collection, and write the data back to your SP list.

    You can refer to below formula as an example:

    ForAll(
    
     RenameColumns(Gallery1.AllItems,"ID","ID1"), /* Use RenameColumns() for disambiguation, you can also rename other columns here */
    
     /* you can add an if()formula outside Patch() to filter some records to edit*/
    
    Patch(
    
     'SPList',
    
     LookUp('SPList',ID=ID1), /* <-- Use the previously renamed column to find specific record */
    
     {
    
     ListColumnOne:GalleryFieldOne,
    
     ListColumnTwo:GalleryFieldTwo,
    
     ...,
    
     ListColumnN:GalleryFieldN
    
     }
    
     )
    
    )

    Note:

    1. When using ForAll with patch, you compare the NewId column, against the Id column in your source data. The disambiguation operator is used when two columns belonging to different tables have the same name. If you don’t use this disambiguation operator you will observe that only the first record gets updated always.
    2. Beside, you also need to make sure that the columnnames are an exact match to the columns in your SharePoint list.

    More details from following article:

    Reference link 

    If above formula still cannot solve your issue, please provide more information or screenshots. So that I can have a test in my environment.

    Best Regards,

    Allen

  • v-albai-msft Profile Picture
    Microsoft Employee on at

    Hi @momureithi ,

    How are things going? Have you solved your issue?

    If my solution is helpful to you, please mark my answer. This will benefit other community members who stuck with the same question.

    Best regards,

    Allen

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

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 352 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 323

#3
Mohsin Ali Profile Picture

Mohsin Ali 226

Last 30 days Overall leaderboard