Skip to main content

Notifications

Community site session details

Community site session details

Session Id : M/qH74ojlyqkevkKrj2q14
Power Automate - Building Flows
Unanswered

When Sharepoint List A has an row deleted, trigger Sharepoint List B to delete too.

Like (0) ShareShare
ReportReport
Posted on 21 Feb 2024 03:36:39 by 2

Hi,

 

I am having troubles figuring out how to use the " When an item is deleted " trigger

There's an existing when an " item is created or modified " trigger that creates / updates an item in Sharepoint List B when Sharepoint List A is updated.

I would like deletion to be possible too. Sharepoint List B contains an extra column that has the "identifier" of the item from Sharepoint List A. 

Problem is, there's no option for identifier in the dynamic content.

I also cannot use ID as an identifier because there's multiple flows running to update Sharepoint List B, not just Sharepoint List A.

 

Any recommendations/ easier way to get this done ?

txwmay_0-1708486357144.png

 

 

  • Santhosh Balakrishnan Profile Picture
    169 on 21 Feb 2024 at 08:23:16
    Re: When Sharepoint List A has an row deleted, trigger Sharepoint List B to delete too.

    Accessing the details of a deleted item from List A for comparison with List B directly is not possible. However, when an item is deleted, in the trigger's metadata, you can retrieve the deleted item's Title in the Name field and can't use id since it may vary another list. Utilizing this information, you can employ a "Get items" action and filter the results to match List B items with List A using a query like Title eq 'Name'.

    sanbss_1-1708503724960.png

     

    Another workaround I can suggest is to add a flag named "DeleteItem Y/N." This involves introducing a new Choice column in List A, offering options for "Yes" and "No." This column acts as a marker, indicating whether an item should be deleted.

     

    By implementing this approach, you can retrieve all column information in Dynamic content, compare it with another list, perform the necessary deletions, and finally remove the triggered item as well.

    sanbss_0-1708503705300.png

     

     

    If this solution proves helpful and resolves your issue, kindly consider marking it as accepted. Doing so will aid others who encounter similar challenges in the future.


    Regards,
    Santhosh Balakrishnan
    Apps4.Pro - Trusted Office365 T2T Migration partner. Migrate Exchange, SharePoint, Microsoft Teams, Stream, Yammer, Power Platform between tenants.
    Product Specialist - http://www.apps4.pro/

     

     

  • v-yetonggu-msft Profile Picture
    on 21 Feb 2024 at 07:33:05
    Re: When Sharepoint List A has an row deleted, trigger Sharepoint List B to delete too.

    Hi @txwmay ,

    The ID column I am talking about is the ID column that comes with the list when it is created, not the ID column that you add manually later.

    The ID column that comes with the list will not change as the list is updated, so it will not cause logical failures.

    Here are the steps to display the ID column that comes with the list:

    vyetonggumsft_0-1708500259244.png

    vyetonggumsft_1-1708500316836.png

    vyetonggumsft_2-1708500350201.png

     

    Best Regards,

    Sunshine Gu

     

  • txwmay Profile Picture
    2 on 21 Feb 2024 at 07:16:35
    Re: When Sharepoint List A has an row deleted, trigger Sharepoint List B to delete too.

    Hi Sunshine,

     

    Thanks for your response. 

    Unfortunately for my case, Sharepoint List B is also updated by Sharepoint List C, D, E, and F. 

    Will using ID work ? There will probably be a logic breakdown cause each list needs to populate / update Sharepoint list B. 

     

    Let me know if you think otherwise.

     

    Thanks a bunch!

     

  • v-yetonggu-msft Profile Picture
    on 21 Feb 2024 at 06:51:37
    Re: When Sharepoint List A has an row deleted, trigger Sharepoint List B to delete too.

    Hi @txwmay ,

    I suggest you use ID dynamic content as the matching condition, because no matter how you update the item in list B, the ID of the item itself will not change.

    I did a test for your reference.

    In my scenario:

    vyetonggumsft_0-1708497945309.png

    vyetonggumsft_1-1708498108567.png

    Best Regards,

    Sunshine Gu

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

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,743 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 66,089 Most Valuable Professional

Leaderboard
Loading started