cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
BrownMango69
Level: Powered On

Using a button for a repetitive procedures causing issues?

Hi

I become accustomed to putting repetitive code in buttons and calling them by the select command. I am now wondering if this is causing me issues and wondered if anyone else has seen the same. For example - I have 2 buttons:

a button called "butCount" to build a collection based on a filter and store the count in a variable called X. 

a button called "butSearch" that assigns some variables to values, does a select("butCount") and builds another collection and then calls a navigate command to another screen.

I have very rare/occasional issues where it seems like the "butCount" button hasn't finished building it's collection and storing a count in variable X and it's already nagivating to the next screen. It appears like "butCount" is starting another thread/process and sometimes it finishes before navigating to the next screen and sometimes it doesn't. Has anyone experienced this type of issue? I know the best way around is to embed all the code in "butSearch" but just wondering if someone can shed some light for me on this.

 

1 ACCEPTED SOLUTION

Accepted Solutions
Super User
Super User

Re: Using a button for a repetitive procedures causing issues?

Hi @BrownMango69 

 

Yes having repetitive code does have its benefits

but having Select(BtnCode) and then within this call another button does cause timing issues

Best would be to add all code to the same button

 

Regards,

Reza Dorrani

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

1 REPLY 1
Super User
Super User

Re: Using a button for a repetitive procedures causing issues?

Hi @BrownMango69 

 

Yes having repetitive code does have its benefits

but having Select(BtnCode) and then within this call another button does cause timing issues

Best would be to add all code to the same button

 

Regards,

Reza Dorrani

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

Helpful resources

Announcements
firstImage

PowerApps Monthly Community Call!

Join us next Wednesday for our Demo Extravaganza, October 16, 2019 8am PDT.

Top Community Contributors for September  2019

Top Community Contributors for September 2019 🎉🎉

Let's thank our top community contributors

firstImage

Microsoft Business Applications Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

SecondImage

Power Platform Summit North America

Register by September 5 to save $200

Top Kudoed Authors
Users Online
Currently online: 272 members 4,253 guests
Please welcome our newest community members: