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
Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Community Calls Conversations

Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Users online (2,937)