Showing results for 
Search instead for 
Did you mean: 
Kudo Kingpin
Kudo Kingpin

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

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.

Community Support
Community Support

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:



Best regards,


Community Support Team _ Phoebe Liu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (4,491)