I have built an app for few users and one of the functions is to delete records from SQL database table. I have tried to use ForAll and Remove IF functions, but these two functions delete records one by one and takes too much time for huge record deletion.
wondering how can i delete 2000 records from SQL table via powerapps quickly.
Please provide your suggestions.
The ForAll function would be not good if you have more 2000+ data.
What you can do is create a flow that will run your delete SQL script.
As for best practice, you should make stored procedures for it. This is just an extra option. you can always settle for a simple query in Power Automate.
I am able to implement bulk deletion by stored procedure and power automate.
create procedure BulkDeletion
delete from table_name
where tableid = @ID
Power Automate Flow:
on Delete icon for each item:
it collects unique ids and will remove items from collection only, not from database
on Save button where actual deletion will be performed :
set will wait for the flow's response and will not execute next commands until it finish
I was having issue with openjson otherwise it is a good option too.
Keep up to date with current events and community announcements in the Power Apps community.
A great place where you can stay up to date with community calls and interact with the speakers.
Check out the latest Community Blog from the community!