Forum Discussion
Use Flow to update SharePoint list Item creating duplicate items
I am trying to use Flow to meet a user's requirements to:
1. copy new items with attachments in List 1 to with attachments in List 2
2. Update changes made in List 1 to List 2 in the same site
Setup:
2 SharePoint list - List 1 and List 2 with same columns (text, choice, metadata).
I created a FLOW using 'When an item is created or modified'.
Result:
1. requirements met
2. when a user updates a column in List 1, a brand new item is created in List 2. If a user updates the 3rd time, a 3rd duplicate item is created.
I have been trying to add 'Condition' to part of the Flow but it did not work. I noticed that 'Condition' does not have 'Edit in advanced mode' but with 'Add' only. I wonder if this has to do with the version of SharePoint online. I cannot make requirement to work.
I searched a number of forums but I have yet been able to meet 2.
Thank you for any help.
10 Replies
- Matt WestonIron Contributor
Hi spvan2019, what Deleted has posted below is the solution for updating the other list item. The only thing I'd add, is you don't need to run them as two Flows. If you have a condition at the start which compares Created Date and Modified Date, you can branch your logic, and handle both scenarios in the same Flow.
- DeletedYes of course, thanks Matt for pointing that out ... I have normally separated them for clarity and ease of maintenance. But not a big deal to do what you suggest :)
- spvan2019Copper ContributorThank you both.
Deleted
somehow, in my lists, it didn't work. I am working to see why it didn't work the same way like your. My lists do not use 'Title'. My site is still in SharePoint online 2013 I believe. I have not been able to make it work.
- Deleted
Need to run them as separate flows. One to Create it in the first place and one to modify the meta data if it changes.
Just created the below and it seems to work. Note: the workflows only run every 3-5mins so you won't see a change until it triggers. Hope this helps :)
- lvk5700Copper ContributorHi there,
Is there any way to avoid having duplicates. So every time an item is updated it creates a new item in the second list.
I am looking for something that stops that from happening.
Item creation in List 1 will lead to an item creation in List 2.
Item update in List 1 will lead to item being updated in List 2.
Right now the updating part doesn't happen. Updating item in List 1 leads to creating a new item in List 2.- Matt WestonIron Contributor
Hi lvk5700
I have created a couple of videos on this subject now:
FlowBites: Does it Exist (Part 1) - Filter Arrays: https://youtu.be/YLqMiDubA7s
FlowBites: Does It Exist? (Part 2) - Filter Query & Expression: https://youtu.be/x6QcntAs2_0
See if these help 🙂