cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
jamesfisher
Frequent Visitor

How to Delete a row from secondary list when deleted from main list

I have already got a flow with 'When an item is created or modified' to add/update a secondary list using the Filter Query (in Get Items) for the 'identifier' of the individual list row. This adds new records or updates current ones successfully.

 

WhenAnItemIsCreatedOrModified.png

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

I now want to be able to 'delete' a list row from the main list and for it to automatically delete it from the secondary list - I'm struggling to figure this out as I don't have the same options/filter options available to me if I use the 'When an item is deleted' trigger

 

Am I going about this in the right way!?

 

 

4 REPLIES 4
Hardesh15
Super User
Super User

@jamesfisher  Store main list item ID in your secondary list then by using that ID in your filter query , you can delete row from secondary list.

Please 'Thumbs Up' the posts that helped you and 'Mark as Solution' if my post answered your question.

@Hardesh /Gopenly.in

Thanks @Hardesh15 - I'm still struggling to get this to work. Here is my flow. The ID is brought across to the secondary list via the 'When an item is created or modified' flow to the AAA ID NO column (Field=AAA_x0020_ID_x0020_No_x002e_)

 

Have I missed a step or set it up incorrectly?

 

PA_DeleteRecords.png 

Secondary list  

SharePointList_Student.png

@jamesfisher  What is error message? And what is the type of your AAA...ID column?

Please 'Thumbs Up' the posts that helped you and 'Mark as Solution' if my post answered your question.

@Hardesh /Gopenly.in

Hi @jamesfisher 

Please make sure you use the correct column internal name.

You can find the column internal name via List settings -> Click on the column name -> It’s at the end of the URL on the Edit column page, after ‘Field=’.

vLilyWmsft_0-1634620454174.png

vLilyWmsft_1-1634620614217.png

Then delete this item.

vLilyWmsft_2-1634621070229.png

Best Regards.

 

Helpful resources

Announcements
2022 Release Wave 1 760x460.png

2022 Release Wave 1 Plan

Power Platform release plan for the 2022 release wave 1 describes all new features releasing from April 2022 through September 2022.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

User Group Leader Meeting January 768x460.png

Calling all User Group Leaders!

Don't miss the User Group Leader meetings on January, 24th & 25th, 2022.

Top Solution Authors
Top Kudoed Authors
Users online (2,690)