things happening concurrently in Power Apps

The sense and nonsense of the Concurrent function in Power Apps

Recently I have found many Power Apps solutions that use the Concurrent function all the time. The idea that the Concurrent function will always make things run faster if not right. Sometimes however it does make sense to use the concurrent function.

When should you use Concurrent?

Obvious nonsense

You should probably start by checking the app checker as it will report some potential issues.

Check the app Checker

When you run a Navigate in your Concurrent function  ( yes IU have seen that happen!).. you will get the Use of functions that can change the screen or exit the app within the Concurrent function are not allowed warning.

Ok, that should be obvious.

Not so obvious nonsense

Then there can be complexities introduced by the Concurrent function. If you set for example many variables then there is no need to use the concurrent function. I tried setting more than 1000 variables. This doesn’t take any time at all. Therefore why would you add a Concurrent function. Remember less code is better!

The sense of Concurrent

When you do multiple data updates or when you read multiple data sources you could gain a lot of speed using the Concurrent function. If you run multiple Patch updates like the one shown below then it could make sense to use the concurrent function.

        {FieldID: Fields.Selected.ID},
            Flag: 1,
            Comment: ChangeComment.Text,

You should however be careful. If you want to have control over the other of the updates then you might not want to use concurrent/.

Another good reason to use concurrent is when you read data form multiple data sources.You could easily reduce the run to to about 50%.



Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: