cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Kudo Kingpin
Kudo Kingpin

Limit of Size of script for OnSelect

Hi

 

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?

 

Thanks

 

Nigel

2 REPLIES 2
Highlighted
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:

https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-concurrent

Please also check the following blog for more details:

https://powerapps.microsoft.com/en-us/blog/enjoy-faster-startup-times-with-the-new-concurrent-functi...

 

Best regards,

Kris

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.
Highlighted

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.

 

Regards

 

Nigel

 

 

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Community Highlights

Community Highlights

Check out the Power Platform Community Highlights

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