Showing results for 
Search instead for 
Did you mean: 
Level: Powered On

OnHidden function now performs unexpectedly when navigating page

We have used the OnHidden feature throughout our app to clear variables and collections as we navigate from page to page. Just recently, it seems that it may be clearing our variables as we are navigating on the same page. E.G. scrolling through a gallery and selecting different ones, seems to trigger the OnHidden function when PowerApps queries back to the DB. 


This recently just started happening and only occurs when in Play mode outside of PowerApps Studio.


Thank you,


Community Support Team
Community Support Team

Re: OnHidden function now performs unexpectedly when navigating page

Hi @PowerAppJammer,


Thanks for the feedback.

According to the description of the OnHidden property, it should not perform the corresponding action unless the user navigates away from the screen.

Besides, if the variables are context variables, then there is no need to clear them, as the scope of it is only within the current screen.

For Collection and the Global variable, consider to clear them after the navigate funciton.




Community Support Team _ Michael Shao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Level: Powered On

Re: OnHidden function now performs unexpectedly when navigating page

Hi @v-micsh-msft,


Thanks for the response. I understand the functionality of the OnHidden property and we are using it to clear variables after we navigate away due to sharing one screen for multiple views/functions. The issue still seems to stem from PowerApps interpreting quick navigation or scrolling of the gallery as leaving the page, ultimately executing the OnHidden function as well as the OnVisible function. Both of these functions then seem to fire off unexpectedly and have caused issues for the end-users.

Again this just started happening within the last two weeks, and only while opening the app outside of PowerApps studio. I will look into clearing context variables or other collections upon all navigation options from leaving the page.


Thank you,


Helpful resources

Better Together’ Contest Finalists Announced!

'Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.


Power Apps Community User Group Member Badge

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


Join THE global Microsoft Power Platform event series

Attend for two days of expert-led learning and innovation on topics like AI and Analytics, powered by Dynamic Communities

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020


Microsoft Business Applications Virtual Launch

Join us for the Microsoft Business Applications Virtual Launch Event on Thursday, April 2, 2020, at 8:00 AM PST.


Community Summit North America

Innovate, Collaborate, Grow - The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors
Users online (8,332)