cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Impactful Individual
Impactful Individual

Too many Set in Concurrent not working in PowerApps on iOS

Hello

Please be so kind as to read my full post before responding.
Thank you for your consideration.

I have one PowerApp which in a published version with PowerApps Release 3.19075.21 works perfectly on all platforms.
Recently I tried making some minor adjustments and republished this PowerApp, yielding a version with PowerApps Release 3.19091.18.
image.png

Trying to use the latest version of this App on iOS devices would apparently hang in some kind of endless loop in App.OnStart.
There were no issues with the old or the new version of this App in the browser or on Android.
Using /* */ and a logging variable, I could narrow down my problem to one long Concurrent statement not terminating.

One part of my App has some DataCards/Controls only Visible or set to Required if certain options in two multiselect fields in a custom entity modeling the App's configuration are set.
Hence my App.OnStart contained on long Concurrent Statement like this:

Concurrent(
    Set(enabledkk_academictitle, CountRows(Filter(config.kk_display_fields_regular, Value='Felder: normale'.'821320028')) > 0),
    Set(requiredkk_academictitle, CountRows(Filter(config.kk_required_fields_regular, Value='Felder: normale'.'821320028')) > 0),

    Set(enabledkk_email1, CountRows(Filter(config.kk_display_fields_regular, Value='Felder: normale'.'821320009')) > 0),
    Set(requiredkk_email1, CountRows(Filter(config.kk_required_fields_regular, Value='Felder: normale'.'821320009')) > 0),

...
)

with around 80-90 such Set statement inside Concurrent.
For debugging I split this large Concurrent into 4 smaller blocks of maybe 30-40 Set inside each Concurrent and appended logging information to a log variable in between.
So my App.OnStart now contained something like:

Set(logText, "0/4");
Concurrent(
    Set( ...
);
Set(logText, logText & ", 1/4");
Concurrent(
    Set( ...
);
Set(logText, logText & ", 2/4");
Concurrent(
    Set( ...
);
Set(logText, logText & ", 3/4");
Concurrent(
    Set( ...
);
Set(logText, logText & ", 4/4");

And just this change already seems to resolve my problem.
With the smaller blocks of Concurrent (and logText) my App is working again on iOS devices.
The modified App (with smaller blocks and debugging info) is also in the same 3.19091.18.

My questions, all basically meaning "Please, somebody explain my discovery to me with proper documentation":

  1. Was there a change in the Concurrent implementation between releases 3.19075.21 and 3.19091.18?
  2. Are there any more differences between PowerApps on Android and PowerApps on iOS?
  3. Is there a in depth documentation of Concurrent which contains info on limits of included statements?

Thank you,
    Sa Wu.

4 REPLIES 4
Highlighted
Community Support
Community Support

Re: Too many Set in Concurrent not working in PowerApps on iOS

Hi @SaWu ,

 

Could you share more details with the error you met?

What do you mean by the issue of  endless loop?

 

Sorry for that there is no actual documents shows that concurrent function had changed in PowerApps Mobile 3.19075.21 Verb.

I also did a simple test, and don't have the issue you mentioned. I concurrented more than eighty set functions in OnStart property, but it can start fine and call the variable well.

 

So it would be better to help you if you share more error information.

 

Best regards,

Sik

Highlighted
Helper I
Helper I

Re: Too many Set in Concurrent not working in PowerApps on iOS

Hi all,

Same error here.

In version 3.19073.16 (july 2019) it worked perfectly. I had to edit one of the pictures, and now in version 3.20014.23, I get around 49 errors all related to the Concurrent formula: "Use of functions that can change the screen or exit the app within the'concurrent' function is not allowed".

 

I cannot restore the previous app either (it is grayed out).

 

 

Highlighted
Impactful Individual
Impactful Individual

Re: Too many Set in Concurrent not working in PowerApps on iOS

EDIT: Your functions are not identical, like I had initially thought...early, not enough coffee. However, the practice of limiting redundant requests still applies. Depending on table size, and delegation issues, could collect the source in question once, then do localized row counts.

A quick observation. You appear very proficient with writing apps, so please take this as a friendly suggestion.
In your initial example, you appear to be setting two variables with the same CountRows function. This may be because it was an example.
However, if that's not the case and you are initializing variables with the same formula, then I highly recommend you front load those into a separate variable, and then set other variables equal to the front loaded variables. A request to CountRows can be relatively large, so avoiding redundant requests will help the app.
Happy coding!
Highlighted
Impactful Individual
Impactful Individual

Re: Too many Set in Concurrent not working in PowerApps on iOS

Hi @GarethPrisk ,

I think you didn't look close enough.

image.png
I didn't and don't have redundancies in that particular piece of code.
I just have two different (but similarly named) fields each for the same option set value.


Just in case you're interested in the background:
In this PowerApp I can define certain inputs as optional/mandatory and visible/invisible.
To achieve this, I have a few optionSets for different logical groups of inputs containing identifier values of these inputs.
And, I used these optionSets in two multi-select options fields each: one for the mandatory inputs, one for the visible inputs.
So in the setup step of the PowerApp, I would set some two state variables each for each input field.
Tthat's why you see groups of two similar, but not identical CountRows(Filter(...)) statements in my code.
Also, since the maximum size for the CountRows input is the size of the option set, there's nothing big in this particlar PowerApp.

Best of regards,
    Sa.

Helpful resources

Announcements
secondImage

Demo-Extravaganza 2020

Check out these cool Power Apps & vote on your favorite!

secondImage

Community Highlights

Check out whats happening in Power Apps

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (7,076)