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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Can one button delete ...
Power Apps
Answered

Can one button delete a record from multiple tables?

(0) ShareShare
ReportReport
Posted on by 72

Hi everyone,

 

I've been trying variations of this formula all morning, but haven't gotten where I needed to.

 

I have two SQL tables connected to two galleries, one gallery on one screen, and the other on a second screen.

 

When I click on the delete button currently, it deletes only the selected item from that gallery. Normal. And this it the formula:

Remove(SQLTable1, WatchScreenGall.Selected);

 

However, I've tried using if conditions, and RemoveIf, such as the following formulas, but nothing is coming of it. Which makes me wonder if two one records from two different tables can be deleted with on button?

 

Remove(SQLTable1, WatchScreenGall.Selected);
RemoveIf(SQLTable2, Subtitle2.Text = WatchScreenGall.Selected.Subtitle1)

 

Any thoughts?

 

Thanks in advance

 

W

Categories:
I have the same question (0)
  • Verified answer
    timl Profile Picture
    36,393 Super User 2025 Season 2 on at

    @wilfordm81 

    I would try something like this, as it's possibly the case that WatchScreenGall.Selected.Subtitle1 isn't accessible following the removal of the parent record:

    With({subtitle:WatchScreenGall.Selected.Subtitle1},
     Remove(SQLTable1, WatchScreenGall.Selected);
     RemoveIf(SQLTable2, Subtitle2 = subtitle)
    )

     

    I'd also check the filter condition of your call to RemoveIf, to make sure it refers to a column name. I assume the column name you want to match is Subtitle2, rather than Subtitle2.Text?

     

  • wilfordm81 Profile Picture
    72 on at

    Hi @timl!

     

    Thanks for responding!

     

    So the column name was actually also Subtitle1. However previously, I was targeting the .Text element, as if it were some ID of sorts 🙄.

     

    Anyway, that formula has worked a treat!

     

    Thanks so much!

     

    W

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 721 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 320 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard