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

Community site session details

Session Id :
Power Apps - Building Power Apps
Answered

deleting associated records as deleting the parent record

(0) ShareShare
ReportReport
Posted on by 73
Hello all, 
 
I have been building a multi screen app and all the screens are connected with each other in the SQL Server Database. Think it as a tree structure, so A > B > C > D > E > F, in this case A is the parent of all and B is child of A and C is child of B etc...
 
What i do want to achieve is when I delete a Parent Record for example C, I would like to automatically delete  D,E,F also. so to achieve this i used this formula but it works for the parent but not for the child;
 
// Remove the selected article
Remove(Articles, ExistingArticle_Gallery.Selected);
 
// Remove associated records in ArticlesLookup
RemoveIf(Article_Volumes, Article_Parent_LookUp_ID = ExistingArticle_Gallery.Selected.Article_ID);
 
does any of you know a solution to this?
 
Thanks in advance
I have the same question (0)
  • Verified answer
    Pstork1 Profile Picture
    68,271 Most Valuable Professional on at
    deleting associated records as deleting the parent record
    To do this you need to make sure you remove the child records BEFORE removing the parent records. So the code you are using should work, but it needs to be in the reverse order.

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Chiara Carbone – Community Spotlight

We are honored to recognize Chiara Carbone as our Community Spotlight for November…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 652 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 410 Super User 2025 Season 2

#3
developerAJ Profile Picture

developerAJ 236

Last 30 days Overall leaderboard