cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Aleksey24
Frequent Visitor

Duplicate Problem While Patching my collection

Hi everyone.

 

I have i problem patching my collection, in a nutshell, if i try to change any data of my gallery more than once, it duplicates in my collection. The collection is intended to NEVER add new rows, but it does while duplicating the new records, thus not updating the old ones. I have tried to use diferent ways to update my collection, but i have not ended up with the right one. This is a picture of the situation: 

Aleksey24_1-1669302081642.png

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
WarrenBelz
Super User
Super User

Hi @Aleksey24 ,

If I can assume the ID is already there.

 

Patch(
   coltaskupdate,
   {ID: ThisItem.ID},
   { . . . . 

 

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

Visit my blog Practical Power Apps

View solution in original post

3 REPLIES 3
WarrenBelz
Super User
Super User

Hi @Aleksey24 ,

If I can assume the ID is already there.

 

Patch(
   coltaskupdate,
   {ID: ThisItem.ID},
   { . . . . 

 

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

Visit my blog Practical Power Apps

Aleksey24
Frequent Visitor

Thank you so much for your answer, though i have one more question, it is related with the calculus that i have to do with the data that the collection changes in my data source (One drive Excel Table). When i do a calculus, for example "=Table$A$1+1" with the numbers in the one drive Excel Table, the cell that contains the "=Table$A$1+1" appear blank until i stimulate the Excel Cell. Do i give up trying?

Hi @Aleksey24 ,

When you use Excel as a data source, it is no longer a spreadsheet with Column/Row references, but a Data Table (formatted as such) with the first row containing the field names (the columns are then the fields) and all rows after that containing the records. $A$1 means nothing to Power Apps.

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

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

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

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 (2,691)