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
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Users online (2,971)