web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / OnChange doesn't work ...
Power Apps
Unanswered

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

(0) ShareShare
ReportReport
Posted on by 141

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

 

Categories:
  • v-monli-msft Profile Picture
    Microsoft Employee on at

    Hi @codebrane,

     

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

     

    Regards,

    Mona

  • codebrane Profile Picture
    141 on at

    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 Profile Picture
    141 on at

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

  • POWERTECH11 Profile Picture
    16 on at

    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?

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Have u found a solution for this ? have the same bug 

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 243 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 190 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 135

Last 30 days Overall leaderboard