cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Owizardo
Level: Powered On

How to find matching record of 2 collections

Hello,

 

I am following the guide (link below) to bulk update records. I have a seperate collection for modified records and will be added as soon as any input change, got that working so far. 

https://powerapps.microsoft.com/en-us/blog/bulk-update-using-forall-and-patch/

 

However, I added a button that would simply add a new record in the collection. This creates a problem where functions like: 

Remove(Modified_Collection , Filter( Modified_Collection, ID = ThisItem.ID ))

or

LookUp(Modified_Collection, ID = ThisItem.ID)

These wont work anymore as adding a record manually does not generate a unique ID ... Now I coul theoratically manually generate the ID by taking the last valid ID and increment by one, temporarily. But this feels like dirty work is this the proper way of doing it?

 

Another thing I tried was from another collection I added a delete button what would look like this:

From_Original_Collection: Remove(Modified_Collection , ThisItem)

This does nothing ... Any idea?

 

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
TimRohr
Level 10

Re: How to find matching record of 2 collections

One suggestion... You could have an extra column in your Collection that represented a "Local GUID" that you would manage. Write your new items to your Collection and handle any algorithmic output of an ID as makes sense to you.

 

Then, follow the logic in this post to tie the ACTUAL GUIDs (in your datasource) to the records associated with your local GUID field, and update accordingly).

View solution in original post

2 REPLIES 2
TimRohr
Level 10

Re: How to find matching record of 2 collections

One suggestion... You could have an extra column in your Collection that represented a "Local GUID" that you would manage. Write your new items to your Collection and handle any algorithmic output of an ID as makes sense to you.

 

Then, follow the logic in this post to tie the ACTUAL GUIDs (in your datasource) to the records associated with your local GUID field, and update accordingly).

View solution in original post

Owizardo
Level: Powered On

Re: How to find matching record of 2 collections

Thanks TimTohr it makes more sense doing it like that. Ill give that a try. 

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors (Last 30 Days)
Users online (5,008)