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 / OnHidden vs App.Active...
Power Apps
Answered

OnHidden vs App.ActiveScreen

(0) ShareShare
ReportReport
Posted on by 6
The OnHidden action isn't acting as I am expecting when using App.ActiveScreen.
 
I put the following in the OnHidden action of a screen.  Lets call it 'First Screen':
 
Set(varPreviousScreen, App.ActiveScreen);
Set(varPreviousScreenName, App.ActiveScreen.Name);
Set(varOtherData, 1)
 
I then Navigate('Second Screen') using a button.
 
Once I arrive on Second Screen, I have a text/labels that have the following variables placed in the text property:
  • varPreviousScreen.Name says "Second Screen"  (not what I expected, was hoping to see First Screen)
  • varPreviousScreenName also says "Second Screen" (not what I expected, was hoping to see First Screen)
  • but, varOtherData says "1" as expected
My use case is to determine the name of the previous screen the user was on.
 
Any insight into how OnHidden really works would be appreciated :)
Categories:
  • Verified answer
    ronaldwalcott Profile Picture
    3,914 Moderator on at
    Isn't the OnHidden executed when the screen is no longer visible therefore App,ActiveScreen would show the current screen. 
     
    You can try using the OnVisible, property of the screen with the variables first initiated in the startup
    Set(varPreviousScreen, varCurrentScreen);
    Set(varCurrentScreen, App.ActiveScreen);

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 224 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 189 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 126

Last 30 days Overall leaderboard