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 / unable to patch collec...
Power Apps
Answered

unable to patch collection to sharepoint list

(0) ShareShare
ReportReport
Posted on by 101

I created a collection and added data when a button is clicked.

karthik26_1-1707463384077.png

 

with the same column name as SharePoint.

But while patching to sharepoint it is showing error.

karthik26_0-1707463315369.png

 

i want to patch the collection to sharepoint.

Categories:
I have the same question (0)
  • Verified answer
    AndrewR1 Profile Picture
    1,572 Moderator on at

    Hi @karthik26 you can try doing it this way: 

     

    ForAll(
     Yourcolection As ITEM,
     Patch(
     YourSPList,
     Defaults(YourSPList),
     {
     SPListCoulnmName1: Item.ColumName1,
     SPListCoulnmName2: Item.ColumName2
     }
     )
    )

     

    This is the general idea but you would loop through each item and then patch a new record to the SharePoint list.

     

    Hope this helps!


    Please click Accept as solution if my post helped you solve your issue. ✔️ This will help others find the solution to this problem. It also closes the item. Remember, you can accept more than one post as a solution.

    If the content was useful in other ways, please consider giving it Thumbs Up. 👍

    Thanks
    Andrew

  • NPPlatform Profile Picture
    606 Moderator on at

    Hi, what does the error on your Patch()-formula say?

  • MLe92 Profile Picture
    33 on at

    Hi,

    if you want to patch a collection to SharePoint, you also need the ID.

    Add the ID field and use the following code to perform the patch.

     

    Patch('FM Calculator results',
    ColFMdata.ID,
    ColFMdata
    )

     

    It is important that the column names are entered correctly 1:1.

     

     

  • WarrenBelz Profile Picture
    156,454 Most Valuable Professional on at

    Hi @karthik26 ,

    If you want to use that structure to (I assume) create new records in the SharePoint list, then all fields in the collection need to exist in the SP list in both exact name and field type. Is this the case ?

  • MLe92 Profile Picture
    33 on at

    Hello Andrew,

     

    it's a common way, but not the most powerful way.

     

    Patch a collection is the best way.

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 July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 358 Most Valuable Professional

#2
11manish Profile Picture

11manish 214 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 185

Last 30 days Overall leaderboard