cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
JohnP
Level 8

OnChange event on controls not consistent when default value is set to output from Component - BUG!

It seems that some controls don't fire the OnChange action when the default value property is set/bound to an output from a component:

 

The toggle control fires OnChange when bound to a boolean output from the control - as expected

The radio control does NOT fire OnChange when bound - visually it updates fine - it fires if I click manually on the radio

The text input does NOT fire OnChange when bound - visually it updates fine - it fires if I edit and press enter

 

I haven't tested any more controls, but this seems like a bug unless I've missed something fundamental.

 

4 REPLIES 4
Super User
Super User

Re: OnChange event on controls not consistent when default value is set to output from Component - BUG!

The thought the OnChange was supposed to only fire when the user made the change, otherwise you could create an infinite loop. I just did a quick test and I think the bug is with the Toggle OnChange because I was able to throw it into an infinite loop just changing from true to false to true to false ..........



--------------------------------------------------------------------------------
If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.
JohnP
Level 8

Re: OnChange event on controls not consistent when default value is set to output from Component - BUG!

@Jeff_Thorpe 

"The thought the OnChange was supposed to only fire when the user made the change"

Where is this documented? It's not logical. The controls changes visually and the OnChange does not fire??? It should be consistent whether it's updated through a variable or user input. PowerApps checks for many such infinte loops scenarios.

 

I sure hope they don't fix the "bug" in the toggle control because I was able to work around the inconsistent behavior of the other controls by using the toggle control along with another output variable that sends the real output value.

Super User
Super User

Re: OnChange event on controls not consistent when default value is set to output from Component - BUG!

I was able to create an infinite loop that had my toggle just switching back and forth, so PowerApps didn't catch it.

 

In the documentation for the Toggle OnChange it says this is how the app responds when the user changes the value of a control.

https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/controls/control-toggle



--------------------------------------------------------------------------------
If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.
Highlighted
JohnP
Level 8

Re: OnChange event on controls not consistent when default value is set to output from Component - BUG!

@Jeff_Thorpe 

"Default – The initial value of a control before it is changed by the user."

So, what's the definition of "changed by the user"? If you have a component that changes the default value (through a variable) by clicking a button in the component I would say that it is changed by the user. If it looks like a duck, if it acts like a duck, etc.

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

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

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors
Users Online
Currently online: 336 members 6,569 guests
Please welcome our newest community members: