Showing results for 
Search instead for 
Did you mean: 
Level 8

OnChange doesn't work with return key on Surface Pro 4

I have a password box set up to allow navigating away from the page if the correct password is entered. To do this I use OnChange and check the text in the box.


On a Mac running Firefox in the designer it works if I enter the text and hit return.


On a SurfacePro 4 running in the PowerApps app it only works if I enter the text then click anywhere outside the text box. It doesn't work with the return key.


The docs say OnChange = "How the app responds when the user changes the value of a control"


Is there any documentation on how OnChange is triggered? It's clearly not triggered by a change in the value of the control as the text is constantly changing as I type but there only appears to be a special way to 'tell' PowerApps that it has changed. On a Mac it's the return key, on a SurfacePro 4 in the PowerApps app it's deselecting the text box. Does PowerApps not know it's changed until the user tells it?






Community Support Team
Community Support Team

Re: OnChange doesn't work with return key on Surface Pro 4

Hi @codebrane,


What is the formula that you are using on the OnChange property?




Community Support Team _ Mona Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Level 8

Re: OnChange doesn't work with return key on Surface Pro 4

hi @v-monli-msft, the formula for OnChange is:


If (PasswordBox.Text = "password", UpdateContext({showBackButton:true, showPasswordBox:false}))


the controls referred to above are unaffected by UpdateContext in OnChange.


The above is never performed in real time. It requires either a return key or deselection.


I thought it might be that UpdateContext doesn't work in OnChange but I added a label and set its text in OnChange to be the same as PasswordBox.Text but that doesn't work either. Then I realised you can't set a label's text from an action. Does this mean you can't use UpdateContext from OnChange either? Is everything queued until 'something' happens, in this case either the return key or deselection?

Level 8

Re: OnChange doesn't work with return key on Surface Pro 4

Hi @v-monli-msft would you have an update on the issue?

Level: Powered On

Re: OnChange doesn't work with return key on Surface Pro 4

This seems to be an issue with the PowerApps app.


I have a very similar problem.  If an app is run using a web browser, the OnChange event of the TextInput control is triggered by the return key but if the app is run in the PowerApps app, the OnChange event is triggered only when you leave the TextInput control - return key is ignored.


Have you found a solution to your problem?

Helpful resources


PowerApps Monthly Community Call!

Join us next Wednesday for our Demo Extravaganza, October 16, 2019 8am PDT.


Microsoft Business Applications Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.


Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020


Power Platform World Tour

Coming to a city near you


PowerApps Community User Group Member Badge

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


Join PowerApps User Group!!

Connect, share, and learn with your peers year-round


Power Platform Summit North America

Register by September 5 to save $200

Top Kudoed Authors
Users Online
Currently online: 138 members 4,503 guests
Please welcome our newest community members: