cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Kudo Kingpin
Kudo Kingpin

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.

 

5 REPLIES 5
Highlighted
Super User II
Super User II

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.
Kudo Kingpin
Kudo Kingpin

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.

Highlighted
Super User II
Super User II

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
Kudo Kingpin
Kudo Kingpin

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.

Highlighted
Frequent Visitor

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

Hi, 

I just step into the same trap.
I am using a component successful to get back a specific value.
This value changes the default value (same like a user input directly) of my TextInput Field to a really new value (same value can be ignored because no changes happen). I logically expect now that the OnChange event is triggert on, to save this new value to my collection. But this dont happen and makes a lot of work now useless.

When will this incredible bug be eleminated ?
Because there is no way to trigger an event automatically when get something out of the component.

Thanks for help

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Watch Now

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (7,911)