Get IDs of all List Items in a list and compare them to another List to sync deleted Items in SharePoint List

Ammar 1 Reputation point
2021-04-08T09:47:18.767+00:00

Using SharePoint Designer workflow or Flow how can I get IDs of all list items in a List and compare them to the IDs of list items in another List so that we can match and sync the deleted items

I am able to sync Creation and Updation via workflow given here: https://sharepoint.stackexchange.com/questions/128596/replicate-data-from-one-list-to-another-list-sharepoint

But how do I also sync on Deletion?

Microsoft 365 and Office | SharePoint Server | For business
Microsoft 365 and Office | SharePoint | For business | Windows
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Echo Du_MSFT 17,316 Reputation points
    2021-04-09T06:56:12.137+00:00

    Hello @Ammar ,

    Please follow steps:

    1.I have two lists "Test123" and "Backup-Test123" from different sites

    86020-old.png

    2.Create a MS Flow to sync delete same items

    2.1 Add the Recurrence Trigger
    2.2 Add first "Get itmes" Action to get all items from "Test123" list
    2.3 Add second "Get itmes" Action to get all items from "Backup-Test123" list
    2.4 Add the Condition: Set the corresponding conditions according to the content of your lists. For example: In my test,

    • Title (Get item2) is equal to Title (Get item)
    • Colors Value (Get item2) is equal to Colors Value (Get item)
    • Status Value (Get item2) is equal to Status Value (Get item)

    2.5 Then, in the "if yes" sction:

    • Add first "Delete itmes" Action to delete same item form "Test123" list. In my test, Id is ID from "Get items" Action
    • Add second "Delete itmes" Action to delete same items form "Backup-Test123" list. In my test, Id is ID from "Get items 2" Action

    86145-flow.png

    3.Save and Test Flow

    4.Navigate to these two lists, you will find that same items have been deleted.

    86107-new.png

    Thanks,
    Echo Du

    ====================

    If an Answer is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    1 person found this answer helpful.

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.