cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
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
Super User
Super User

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

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

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
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Community Highlights

Community Highlights

Check out the Power Platform Community Highlights

Users online (8,054)