cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Kjs1
Regular Visitor

Deleting linked records from 4 SQL tables

Can you help me figure out how to use the Remove function? I have 4 SQL tables that have linked ID relationships among them. When I remove a single record in a gallery, I am running into primary key constraint issues. Is there a way to write the Remove function so that it will look at each table and its associated key and then remove the item from the stated gallery?

2 REPLIES 2
DavesTechTips
Super User
Super User

Hi Kjs1.

 

Have you tried to use RemoveIf(datasource,ID=IDtoremove). Start with the child tables and remove all records that might be referencing the parent that you are planning to remove?.

 

Let me know if you don't come right.

Yes, I found a related solution.  Thanks

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

May UG Leader Call Carousel 768x460.png

June User Group Leader Call

Join us on June 28 for our monthly User Group leader call!

PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

PA.JPG

New Release Planning Portal (Preview)

Check out our new release planning portal, an interactive way to plan and prepare for upcoming features in Power Platform.

Top Solution Authors
Users online (1,130)