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

Notifications

Announcements

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:
I have the same question (0)
  • Verified answer
    ronaldwalcott Profile Picture
    3,847 Super User 2025 Season 2 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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 721 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 320 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard