Tuesday, June 10, 2025

Concurrent Power Automate Queries: Optimizing for slow data sources

For large datasets and sometimes querying APIs or Power Automate queries to retrieve information concurrently, it is helpful to use the Concurrent() function to retrieve multiple items at the same time.  However, Concurrent() cannot exist within a ForAll() and when processing groups of items it may be required to chunk them up to avoid overloading a datasource (can you really query 1000 rows simultaneously from Excel or your APIs without breaking something?)  

This post walks through how to process chunks of data simultaneously while also giving a nod to the limitations of certain back-office platforms.

In my own scenario, this process is querying either an API (if it is working) or an Excel export from the same ERP.  As we have ~45,000 records in one of those Excel files and roughly ~200,000 in another, these queries can take up to 30 seconds to retrieve a value from one of those files per user.  So splitting up these tasks to take place concurrently is essential.

Thursday, April 17, 2025

Detecting End-User Changes to Fields Before Saving/Abandoning Changes

There are of course many ways to approach how to detect if somebody changed a value in a field and set a flag to know if something needs to be "saved".  However, it can get complex if you are doing this for many MANY fields or also for a gallery of items where changes could be made to many of them at once.

This is an example of several ways to approach the problem so you can have some standardized code to make updates back to your datasource much easier and more efficient (and not throw errors).