cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
New Member

Delete an item in SharePoint list - Trigger: When an item is changed in a different SharePoint list

 

I have 2 SharePoint lists: 1. Morning Report -> List of items to be checked every morning 2. Morning Report - Not working items -> List of items that are not working (derived from the first list).

The first list contains a fixed number of items that need to be checked every morning and one of this lists' column is a Boolean (YES/No) column called: "Is Working?". If an item during the morning check is not working

 than we change the "Is working?" for that item (on the first list) to false/No (default state for all items is Working = YES).

The second list is a dinamic one and contains items from the first list, only the items that have changed on the "Is working?" column on the first list from YES to NO. For that I have created a flow that each item that is being changed on the first list (the change is -> If an item is modified and the "Is working?" column equals false) than this item is created in the second list. This flow works perfectly fine. Each time I change the "Is working?" column from the first list to False, the same item and all the relevant columns are created in the second list – exactly like the first list. No problems with this flow.

 

I wanted to create another flow that if the "Is working?" column, for a specific item, is being changed back to true on the first list -> so check if this item exists in the second list, and if so -> delete it from the second list. Which means that basically the second list should contain only items that are not working and in case an item is changed back to working - it will be deleted from the second list. 

 

I have created a flow which its trigger is: if an item is created or modified (from the first list) than if the "Is working?" field is changed to True/YES -> find the item in the second list and delete it from it.

This flow doesn't work.

Below you may find the screen shot of the flow and screen shot of the error I get:

The FlowThe FlowThe errorThe error

2 REPLIES 2
Highlighted
Community Support
Community Support

Re: Delete an item in SharePoint list - Trigger: When an item is changed in a different SharePoint l

Hi Aasayag,

 

You may try to add a Condition after the action “Get items” to filter item that has the same Title. I have tested the following configuration and it works fine.


The Condition is configured as: Test2 is equal to bool(‘True’).

3.PNG

 

While if you want to use the Filter query, please try to change the code to Title eq ‘Dynamic content’. The following flow configuration also works fine.

4.PNG

 

Please try both the two ways. Hope it can be a reference for you.

 

PS: When you sharing pictures that contain your privacy info, please remove/hide your privacy info. Thanks for your understanding. 

 

Best regards,
Mabel Mao

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Highlighted
New Member

Re: Delete an item in SharePoint list - Trigger: When an item is changed in a different SharePoint l

Thank you for your response and assistance.

 

I have tried both configurations and now I get an error only on the "Delete item" section.

 

I just want to clarify something, the delete action is not on the same list.

As mentioned, I have 2 sharepoint lists, one includes only items that are not working. Therefore, when I update an item on one list and change the "Is working?" column from FALSE to TRUE, I want to find the exact same item in the second list (it has to be there since the second list is created from the first one -> from a change to the "Is working?" column) and delete it from there (since the second list contains only Items that are not working).

According to your 2 exapmles, the action for deleting (the last action in the flow) is on the same list you have.

Helpful resources

Announcements
firstImage

Super User Program Update

Three Super User rank tiers have been launched!

firstImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

Users online (7,463)