2

What I'm trying to achieve is when an item is created in a SharePoint Online list located in one site collection, to create that very same item in another SharePoint Online list located in another site collection having the same field values(that I managed to achieve). Then, when that item(the created from the first list one) is modified in the second list that took the entry from the first list, the field values that were updated in the second list to be updated in the corresponding fields for that very same entry in the first list. Any ideas how to achieve the second part? I used Microsoft Flow to achieve the first part. Pic of the flow that works only from list1 to list2:

enter image description here

0

Add a field in the first list, which holds an Id of an item from the second list. Let's call it "ID" field. Then when an item in the second list is updated, find the record using "ID" field in the first list and update that record with values from the second list item. You should modify your first Flow to additionally update the first list (update "ID" field when the item in the second list is created)

Does it work for you?

0

What Sergei has described will work. I have implemented a similar set of Flows including deleting an item in the secondary if it is deleted in the first. Make sure to Enforce Unique Values in the "Primary Site ID" field in the second site to make sure there can't be multiple entries in the second site per item in the primary. There are a few more things you may want to consider in doing that.

It would be a good idea to break permissions on that secondary site list and restrict who can create entries or at the least hide the "Primary Site ID" field from editing, so that no one can create an entry and use one of the "Primary Site ID" values that your Flow would need.

Another thing to be aware of with this Flow is to ensure you don't create circular triggers. If both of the Flow triggers include "When an item is Modified" or "When an item is create or modified" then they will go into an infinite loop by triggering the other each time the one is triggered.

For additional details, the MS Flow blog has a post which describes a similar task. Note that it is dated and has an inaccuracy regarding the "When an item is deleted" trigger which has since been added. Link below.

https://flow.microsoft.com/en-us/blog/copying-using-filtering/

  • OK, but how would it know which entry to update in the first list? Is it a separate, second flow that needs to be created? What I'm doing now is when an item is created in the first list to create the same item in the second list. Then I put a test field in the second list to automatically become yes if an item is modified and then did the same create process, but this time trying to update the original item from the first list with the updated values from the second. Didn't work. Added a pic of the flow I set to get a better idea. – Benny Blanco Jan 22 at 12:10
  • Yes, you need a second flow to trigger a change in the second list. Since the only trigger for modifying an item is "When an item is created or modified", you will need to add an if-statement to proceed only if an item is modified (If Created != Modified, then item is modified, else item is being created). You will then use the "Primary Site ID" field in the second list to "Get Items" from the first list with a filter statement on the ID. It will require you to make updates in a loop, but since it is a unique ID it will only edit the one item. – Greg.Timm Jan 23 at 16:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.