Skip to main content
Community site session details

Community site session details

Session Id : 2Zp5Wm5BAqbWr9Pb90ncQh
Power Automate - Building Flows
Answered

Delete Item in a SharePoint List when Deleted in another SharePoint List

Like (0) ShareShare
ReportReport
Posted on 12 Nov 2020 15:16:55 by

Hello,

 

I have two almost identical SharePoint Lists. One List is used by my users at Power Apps. The other List is a backup.

So, when my users delete an Item, it should be deleted in the backup list too.

 

But, when i tried to create a flow to delete an item when it is deleted in the List users work, there is only the option to delete through the ID of the item, but my lists does not share the same ID.

 

There are some other way to run it?

 

Best regards,

  • Neha12 Profile Picture
    31 on 23 Aug 2022 at 11:45:33
    Re: Delete Item in a SharePoint List when Deleted in another SharePoint List

    Hi @tom_riha 

     

    I used the same flow

    I used both the id column in filter query

    But the flow is deleting in row order sequence not mapping with ids, it doesn't delete the same ID from source to destination,  instead it deletes the ID with same row number that was deleted in source 

     

    Please help

     

  • Community Power Platform Member Profile Picture
    on 12 Nov 2020 at 20:36:07
    Re: Delete Item in a SharePoint List when Deleted in another SharePoint List

    Thanks @tom_riha !

     

    It worked!

     

    Best regards,

  • tom_riha Profile Picture
    10,127 Most Valuable Professional on 12 Nov 2020 at 19:27:18
    Re: Delete Item in a SharePoint List when Deleted in another SharePoint List

    For the trigger 'When an item is deleted' the item title is the 'Name' dynamic content, the filter query should be exactly as on the screenshot I posted.

  • Community Power Platform Member Profile Picture
    on 12 Nov 2020 at 18:37:26
    Re: Delete Item in a SharePoint List when Deleted in another SharePoint List

    Hi @mcin9781 ,

     

    I have a custom ID, but in the collumn Title. That is the option that does not appears at the filter query.

     

    Best regards,

  • Community Power Platform Member Profile Picture
    on 12 Nov 2020 at 18:32:25
    Re: Delete Item in a SharePoint List when Deleted in another SharePoint List

    Hello @tom_riha ,

     

    This solution was the first thing i thought. But the "Title" field to choose that is the one unique at my lists does not appers at the dynamic content.

     

    Look what i did. When an item is deleted, get items. In the filter Query, the field Title is not appearing.Imagem.png.

     

  • Verified answer
    tom_riha Profile Picture
    10,127 Most Valuable Professional on 12 Nov 2020 at 18:07:58
    Re: Delete Item in a SharePoint List when Deleted in another SharePoint List

    Hello @Anonymous ,

    if the items have unique 'Title', you could add 'Get items' action to the backup list, use filter to get only items with the same title as the deleted item, and then delete it using the returned item ID.

    Title eq '@{triggerOutputs()?['body/Name']}'

     image.png

    If the item 'Title' is not unique (you've got multiple items with the same title), then I think you'll have to store the ID of the original item in the backup list and use the same logic, just based on the ID instead of Title.

  • Verified answer
    mcin9781 Profile Picture
    on 12 Nov 2020 at 18:03:31
    Re: Delete Item in a SharePoint List when Deleted in another SharePoint List

    Hey Rodrigo,

     

    You could have a custom ID field on the backup list that identifies with the original list to select the file to delete.  Let me know if this help.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Announcing our 2025 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for…

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!