cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
codebrane
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?

 

thanks,

 

Alistair

 

4 REPLIES 4
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?

 

Regards,

Mona

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.
codebrane
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?

codebrane
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?

POWERTECH11
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

Announcements
firstImage

PowerApps Monthly Community Call!

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

firstImage

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.

firstImage

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

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

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

FourthImage

Join PowerApps User Group!!

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

SecondImage

Power Platform Summit North America

Register by September 5 to save $200

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