Hi Experts,
I have an Excel Online for Business Spreadsheet Table that is updated by Power Apps and I need a flow to remove rows from the top of the table.
I need to find total number of rows ("X"), then
("X" - 1500) = "Y", then
Delete "Y" number of rows at top of table.
Can this be done in Power Automate and have it run when table reaches < 1500 rows?
I'm new to Power Platform and just need a little guidance.
Solved! Go to Solution.
Hi @william_wallace :
Cause Power Automate can only delete one row at a time, you should create a loop to delete rows one by one.I suggest you use the Remove function of Power Apps to delete records in batches.
1\Set the 'Data row limit' to 2000
2\Add a button and set it's OnSelect property to:
Remove(TableName,FirstN(TableName,30)) /*Delete the top 30 records of the data source*/
Note:If there are many records to be deleted, this command will take a long time to execute
Best Regards,
Bof
Hi @william_wallace :
Cause Power Automate can only delete one row at a time, you should create a loop to delete rows one by one.I suggest you use the Remove function of Power Apps to delete records in batches.
1\Set the 'Data row limit' to 2000
2\Add a button and set it's OnSelect property to:
Remove(TableName,FirstN(TableName,30)) /*Delete the top 30 records of the data source*/
Note:If there are many records to be deleted, this command will take a long time to execute
Best Regards,
Bof
@william_wallace & @v-bofeng-msft
Check out the new Excel Batch Delete template. It can handle your request in under 30 seconds with less than 8 actions.
https://powerusers.microsoft.com/t5/Power-Automate-Cookbook/Excel-Batch-Delete/td-p/1634375