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?
The only workaround I've read is here:
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."
Hi @prathees ,
You can use ForAll(records_to_update, Patch()) to update multiple records to the data source:
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.
Check out the on demand sessions that are available now!
Stay up tp date on the latest blogs and activities in the community News & Announcements.
Features releasing from October 2020 through March 2021
Check out the Power Platform Community Highlights