Showing results for 
Search instead for 
Did you mean: 
Kudo Kingpin
Kudo Kingpin

Limit of Size of script for OnSelect



Is there a limit of the size of a script attached to an "OnSelect" action.


I have a script of over 1000 lines attached to an "OnSelect" statement.


I am now finding editing the script is becoming an art as sometimes the script has lots of errors (mostly, a variable cannot be found) and then when I add a blank line the issue goes away.


Am I hitting a limit?





Community Support
Community Support

Hi @NigelP,

Could you please share a bit more about your scenario?

Currently, there is no official document mentioned about the limit of Size of scripts typed within the OnSelect property/event.

But if you type large execution scripts within the OnSelect property/event, it would take longer to render. In addition, it would also increase the consumption in your CPU resources, memory, and network bandwidth.

In addition, if you want to improve performance when you execute scripts within the OnSelect property, I think the Concurrent function could achieve your needs. More details about the Concurrent function, please check the following article:

Please also check the following blog for more details:


Best regards,


Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi Kris


I have a screen which has five tabs on it.


Depending upon what variables are set in a list to what values then various sections of the script are executed.


There are about 30 variables in each record and 70 records.  This is a given by the customer.

In addition, I have to loop around each of the records and then action each of the variables


So to action each of the possibilities takes a lot of script.


and ForAll is a bit of a Sledgehammer to go around all of the records each time.







Helpful resources

PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!


Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Power Apps June 2021

June Power Apps Community Call

Don't miss the call this month on June 16th - 8a PDT

Top Solution Authors
Top Kudoed Authors
Users online (99,375)