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 / Problem with Patch and...
Power Apps
Unanswered

Problem with Patch and Collect, code that was working perfectly fine earlier

(0) ShareShare
ReportReport
Posted on by 356

I’ve been building an App now for two months, and am close to finishing it, but this morning the behaviour is really strange and this is without me touching the affected areas. They were working perfectly as of yesterday morning, but this morning there is some really bizarre behaviour.

 

  1. I have a Collection connected to a Gallery, in the Gallery I have multiple Textboxes, DropDowns etc. and the Gallery is used for editing the collection. As of this morning, when I patch a blank row into the collection, all existing Rows in the Gallery are reset to blank.
  2. Typically after editing items in the above Gallery, I “Collect” them to a new Collection, which I then use to pass on a JSON to Flow / SQL Procedures to update tables in SQL DB.

So in essence patch and Collect were working perfectly fine yesterday, but as of this morning I'm having problems. If someone from the PowerApps can reach out to me, i'd be happy to share the session details.

Categories:
I have the same question (0)
  • v-yutliu-msft Profile Picture
    Microsoft Employee on at

    Hi @UB400 ,

    Do you mean that

    1)you patch a blank row into the collection,then all existing Rows in the Gallery are reset to blank?

    2)this app used to word good, while hasn't worked till this morning?

    Could you show me the formulas about the collection, especially the patch part?

    Please check whether you use Collect, ClearCollect or Patch function to update the collection.

    Each of them is different.

    Using collection function could only create new records in the collection.

    Using ClearCollect function will clear the original collection and replace with new data.

    Using Patch function could create new records and update existing recprds.

    Here are docs about these functions, please pay attention to distinguishing them:

    https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-clear-collect-clearcollect

    https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-patch

     

     

    Best regards,

     

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!

Leaderboard > Power Apps

#1
wolenberg_ Profile Picture

wolenberg_ 119 Super User 2026 Season 1

#2
WarrenBelz Profile Picture

WarrenBelz 107 Most Valuable Professional

#3
Haque Profile Picture

Haque 103

Last 30 days Overall leaderboard