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

Update SQL table that has more than 2000 rows

Hi!

 

I am currently building an App that updates an existing SQL table(more than 2000 rows) based on the records selected by the user in PowerBI (adding the same comment to multiple records in a table). I tried using UpdateIf(), but since UpdateIf() is non delegable it updates records that are only present within the 2000 rows that get picked up. Is there any workaround?

 

@mr-dang @Mr-Dang-MSFT 

 

 

3 REPLIES 3
Highlighted
Impactful Individual
Impactful Individual

Re: Update SQL table that has more than 2000 rows

HI @prathees 

The only workaround I've read is here:

https://blog.coeo.com/davidmorrison/powerapps-500-record-limit-delegation-and-how-to-work-around-it

It's a bit of a slog, unfortunately.

 

---
Please hit the "Accept as Solution" button if my post answered your question! If my post was helpful please consider giving it a "Thumbs Up."

Highlighted
Power Apps
Power Apps

Re: Update SQL table that has more than 2000 rows

Hi @prathees ,

You can use ForAll(records_to_update, Patch()) to update multiple records to the data source:

https://powerusers.microsoft.com/t5/Building-Power-Apps/Performance-Patch-LookUp-vs-UpdateIf-Inside-...

 

 

Highlighted
Frequent Visitor

Re: Update SQL table that has more than 2000 rows

Hi!

 

Thanks for your reply. Even though I would be able to collect all the records, the conditions that I need to give within the 'Patch' statement will make the function non-delegable. 

 

In my App, the list of records that need to be updated are selected by the user from a PowerBI table visual and displayed in a gallery in a PowerApp below in the PowerBI report(only 1000 records are passed from PowerBI to PowerApps through PowerBIIntegration.Data, so I have a pop-up message asking to reduce the number of selections in my app if greater than 1000). On clicking the save button, there is a table that is cleared and inserted with the modified values along with the necessary keys using 'Patch' function. This table is then joined with the table that needs to be updated to pick up the required changed values using flow and a stored proc.

 

I tried passing the gallery as a JSON input to the stored proc and avoid inserting gallery contents to a new SQL table. But, since my gallery has controls, it didn't work.

 

Thanks

Helpful resources

Announcements
secondImage

New Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

August 2020 CYST Challenge

Check out the winners of the recent 'Can You Solve These?' community challenge!

Experience what’s next for Power Apps

Join us for an in-depth look at the new Power Apps features and capabilities at the free Microsoft Business Applications Launch Event.

Check this Out

Helpful information

Featuring samples like Return to the Workplace and Emergency Response Applications

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Users online (3,335)