cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
DAVIDPOWELL
Post Prodigy
Post Prodigy

Delete ALL records in a sql sever table from Powerapps

I need to 

Delete ALL records in a sql sever table from PowerApps.

I CAN NOT use  Flow at this time.

table name is  "t_sst_BrandMasterTest"

 

However, I could use where "Supplier_Name" is not null ?

 

Thanks

Dave

 

1 ACCEPTED SOLUTION

Accepted Solutions
GarethPrisk
Resident Rockstar
Resident Rockstar

Depending on the record volume in the table, I would recommend that you offload this bulk deletion to the SQL server.
The PowerApp cannot invoke a stored procedure (SPROC) directly, but you can create a Power Automate flow and call that from your canvas PowerApp.

https://docs.microsoft.com/en-us/connectors/sql/

Otherwise, any code you write in the app will require deleting row-by-row, which will inevitably be a long running process and/or have delegation issues.

View solution in original post

3 REPLIES 3
GarethPrisk
Resident Rockstar
Resident Rockstar

Depending on the record volume in the table, I would recommend that you offload this bulk deletion to the SQL server.
The PowerApp cannot invoke a stored procedure (SPROC) directly, but you can create a Power Automate flow and call that from your canvas PowerApp.

https://docs.microsoft.com/en-us/connectors/sql/

Otherwise, any code you write in the app will require deleting row-by-row, which will inevitably be a long running process and/or have delegation issues.

as I stated, I cant use Flow.

 

I used this:

Remove('[dbo].[t_sst_BrandMasterTest]',Filter('[dbo].[t_sst_BrandMasterTest]',Supplier_Name <> Blank()));

 

worked good.

 

dave

If it worked then mark your answer as a solution

Helpful resources

Announcements
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.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

Top Solution Authors
Top Kudoed Authors
Users online (2,961)