cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
illmatic_one
Helper I
Helper I

Variables not consistently updating OnSelect of Button

I have a form with multiple sections that each have a Submit Button.  On the Submit Button's 'OnSelect' property, I have a few variables that update a field, toggle a dialog window, and update the OnStart of a Timer.  Once the timer begins, the form is submitted -- this ensures that all variables have been updated prior to the form submitting.

Unfortunately, sometimes when clicking the button, it seems as if the timer is not starting.  Therefore, the end user clicks the button and only the pop-up shows.  I tested by removing the timer entirely, and just putting SubmitForm on the OnSelect of the button, however, again, sometimes it submits and other times nothing.

I had an UpdateContext for the variables, but then changed to just setting the variable and this doesn't seem to change the behavior.  

For context, here is the formula:

OnSelect:   Set(varStatusChange, "Status"); Set(varTimer, true); Set(pop-up, true);

And the Timer:

OnTimerEnd:  Set(varTimer, false); SubmitForm(Form1);

Auto pause: On

1 REPLY 1
v-bofeng-msft
Community Support
Community Support

Hi @illmatic_one ,

 

Please try:

 

Set(varStatusChange, "Status"); Set(varTimer, false);Set(varTimer, true); Set(pop-up, true);

 

Best Regards,

Bof

Helpful resources

Announcements
Ignite 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Power Apps Africa Challenge 2022

Power Apps Africa Challenge

Your chance to join an engaging competition of Power Platform enthusiasts.

Super User 2 - 2022 Congratulations

Welcome Super Users

The Super User program for 2022 - Season 2 has kicked off!

September Events 2022

Check out all of these events

Attend in person or online, there are incredible conferences and events happening all throughout the month of September.

Users online (2,741)