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

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
Super User
Super User

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
Super User
Super User

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

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Users online (1,143)