cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Termigez1
Helper I
Helper I

Update records in the collection based on value from another collection

Hello,

 

I have 2 collections:

 

ColManualChanges

ID Name VersionStatus
1AV11
55DV11
153AV11

 

ColFinalExport

ID Name VersionStatus
1AV10
2BV11
3CV11

...

They have the same number of columns and column names. ColManualChanges consist of just "few" records and ColFinalExport are basically my all records from data source. I want to update the value of  ColFinalExport.Status based on the ColManualChanges.Status where ColManualChanges.ID = ColFinalExport.ID. (For each pair of ID in two collections all the values of the columns will always be the same, except the value of Status). So basically in given example for ID = 1 the value of Status in ColManualChanges is 1 and for ColFinalExport it is 0 so I want it to be updated to 1 so ColFinalExport would look like this:

 

ColFinalExport

ID Name VersionStatus
1AV11
2BV11
3CV11

 

1 ACCEPTED SOLUTION

Accepted Solutions
krishnags
Responsive Resident
Responsive Resident

you can try 

ForAll(ColManualChanges,Patch(ColFinalExport,Lookup(ColFinalExport,ID=ID),{Status:Status}))

 

you can include all other required fields

View solution in original post

1 REPLY 1
krishnags
Responsive Resident
Responsive Resident

you can try 

ForAll(ColManualChanges,Patch(ColFinalExport,Lookup(ColFinalExport,ID=ID),{Status:Status}))

 

you can include all other required fields

Helpful resources

Announcements
PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

Top Solution Authors
Top Kudoed Authors
Users online (1,639)