Hello! Somewhat new to Powerapps here!
The app I'm building allows the user to view a SharePoint data form in edit mode on its own screen, make changes, and either apply or cancel those changes. Every field in the form is set to change a "boolean" variable, rwUpdates, to true when a change is made, disabling the buttons that would navigate away from the screen on click until the user submits the form changes or cancels the changes. Cancelling will reset the form to its initial values and set rwUpdates to false, thus re-enabling the navigation buttons. Applying the changes will submit the form.
But here's the issue: reseting the form causes Combo Boxes and Date Pickers to re-trigger the OnChange event, causing a loop. I currently have an awkward solution where pressing cancel sets another variable to true when the form is being reset,and the OnChange event won't change rwUpdates to true if that other one is true. Then there's a timer involved which will change that second variable back to false once the form has finished reseting (if I can only get rid of this timer bit, I'd be happy).
Is there a reason why Combo Boxes and Date Pickers seem much more delicate when it comes to OnChange events than, say, text inputs? And is there a neater solution to this predicament I just haven't thought of? Combo Boxes especially just seem to trigger the event at every little thing, even changing the item for the form!
Thanks for your time!