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

How to update list 2 when list 1 has been modified where items in list 1 and 2 have different IDs

Hi all,

 

I have two lists in SPO. List 1 and List 2. I want a flow to create the same item that has been created in List 1 to List 2 which is easy enough. However I also want to have flow update the item created in List 2 with any changes that are made to that item in List 1.

 

Where I am struggling is the IDs of the items are not the same in the two lists as in List 2 more records will be added outside of flow meaning the IDs will be out of sync between the lists.

 

I have set up a column in List 2 called 'List1ID' which updates the ID no. of that item from List 1 here in a number format so it can be reference however I cannot seem to get flow to work. I am basically looking to make a condition of some kind that says does ID in List 1 equal ListID1 in List 2, if yes then update that item in List 2 and if no then create that item in List 2.

 

It sounds so simple but after trying so many approaches I just cannot get this to work.

 

Thanks,

1 ACCEPTED SOLUTION

Accepted Solutions
Dual Super User
Dual Super User

Re: How to update list 2 when list 1 has been modified where items in list 1 and 2 have different ID

Let's choose "Filter array" approach: you just need to add the output of the "Get items" as input for the Filter Array ("From" field)

Then you need to define the proper condition by selecting both the target column from List#2 and the desired ID value.

Hope this helps

Filter array





If anybody solved your question, remember to mark its post as a solution!

Proud to be a Flownaut!





View solution in original post

3 REPLIES 3
Dual Super User
Dual Super User

Re: How to update list 2 when list 1 has been modified where items in list 1 and 2 have different ID

Hi @james_riach

I guess you are applying "Get items" action block on List#2; and you need to filter the results under List1ID eq 'x' with X being the ID from List#1, right?

You can try two different approaches: the first one is to apply an ODATA filter on "Get items" action block under Advanced options; the second one is to apply a subsequent "Filter array" action block.

Hope this helps

 





If anybody solved your question, remember to mark its post as a solution!

Proud to be a Flownaut!





james_riach
Level: Powered On

Re: How to update list 2 when list 1 has been modified where items in list 1 and 2 have different ID

Hello @efialttes

 

Thank you for your response.

 

You are correct. I am applying a "Get items" action block on List 2.

 

I have tried doing both the "Filter Query" under the "Get Items" action block and the "Filter Array" action but I cannot get neither to work.

 

Would you be able to provide me with an example of how to get this working please?

 

Thank you

Dual Super User
Dual Super User

Re: How to update list 2 when list 1 has been modified where items in list 1 and 2 have different ID

Let's choose "Filter array" approach: you just need to add the output of the "Get items" as input for the Filter Array ("From" field)

Then you need to define the proper condition by selecting both the target column from List#2 and the desired ID value.

Hope this helps

Filter array





If anybody solved your question, remember to mark its post as a solution!

Proud to be a Flownaut!





View solution in original post

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

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

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Kudoed Authors
Users Online
Currently online: 144 members 5,372 guests
Please welcome our newest community members: