web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Bypassing "When an ite...
Power Automate
Answered

Bypassing "When an item is deleted" with lookups?

(0) ShareShare
ReportReport
Posted on by 260

Hi all

 

My problem

I have a master list, list 1

And a list for people to edit, list 2

 

Most of the data on list 2 comes from lookups

 

When an item is deleted from list 1, it should delete on list 2

 

The Issue

The trigger "When an item is deleted" requires a Site Collection Admin account to use, which I am not, and anyone who is will not deal with my problem

 

Since I have the lookups in place, is it possible to use "When an item is updated" on list 2 and look for blank columns? The only one that is guaranteed to have something in it is the main lookup column "Project Name", but I could do a hidden column with a default value

 

If anyone has any tips before I try this out, let me know

Conn

 

 

Categories:
I have the same question (0)
  • Fredrik_A Profile Picture
    3,570 Super User 2026 Season 1 on at

    Maybe an option is to run a flow every hour for example and check what items still exist in the Main list?

     

    Another option might be that instead of them deleting it the "regular" way, you create your own list-button with column formatting that switches a true/false column which then triggers a flow, which then can delete both items.

  • ConnM Profile Picture
    260 on at

    >Maybe an option is to run a flow every hour for example and check what items still exist in the Main list?

     

    I think this could be a successful option.

     

    The button idea is good, but I don't want to be dealing with complaints every time someone deletes something in the standard way, and I don't want to micromanage the list

  • ConnM Profile Picture
    260 on at

    I finally got round to trying this out

     

    Since the items in each list share ID numbers, I thought this would work

     

    - I get the items from both lists, about 50 each

    - Initialise a false boolean

    - For each in list 2

      - For each in list 1

        - Condition, check if IDs match

          - If true, set bool to true

      - Condition, Is bool true

        - If true, delete item in second list

      - Set boolean to false

     

    ConnM_0-1719485504969.png

     

    The issue with this is that it is a fairly small list, but this intensive process takes about ten minutes to run, and three of these has hit the daily 10000 request limit

  • ConnM Profile Picture
    260 on at

    I'm still having problems with this

     

    ConnM_0-1719999314381.png

    So I am now updating the original list to add the ID numbers of the corresponding item in the second list.

     

    This deletion flow runs every thirty minutes during business hours.

    It gets the items in list 1, and adds their "ListID", which are the IDs for the corresponding item in list two, to an array

    It then gets the items in list two, and adds their IDs to another array

    ConnM_1-1719999529092.png

    Then for each item in array 2, a condition checks if it is contained in array 1

    ConnM_2-1719999591437.png

    Issue is now it is always solving that condition as false, and deleting every item in list two. This should not be the case

     

    I think I am close, but I have not created the arrays properly, or I have misunderstood how the "contains" condition works

     

    Any help appreciated

    Conn

  • Verified answer
    ConnM Profile Picture
    260 on at

    I have it working

     

    All the examples I had seen were using strings in their arrays when using contains. No one had explicity said not to use number, but I decided to try converting them

     

    ConnM_0-1720011334751.png

    If something is not in list 1, I convert it back to a number and use it to delete the item in list 2

    ConnM_1-1720011408009.png

     

    The flow runs twice and hour for 9 hours a day, and performs around 6000 actions in a day, keeping me under the 10000 limit

    ConnM_2-1720011578493.png

     

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 639

#2
Valantis Profile Picture

Valantis 392

#3
11manish Profile Picture

11manish 350

Last 30 days Overall leaderboard