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

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
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Top Solution Authors
Top Kudoed Authors
Users online (4,514)