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 / Screen's OnVisible eve...
Power Apps
Unanswered

Screen's OnVisible event is not fired the first time navigating to it

(0) ShareShare
ReportReport
Posted on by 28

Hi everyone,

 

I have come across a very weird bug here.

 

This is the code on one of my screen's OnVisible attribute:

UpdateContext({
 ShowSomeDialog:false,
 SomeText:"Hi!"
})

When I navigate to this screen, my pop-up with the Visible attribute set to ShowSomeDialog is visible even though it should be set to false, and my label with the Text attribute set to SomeText is empty.

 

BUT, if I go to the previous screen and navigate to my problematic screen again, this time the OnVisible event seems to be triggered correctly.

 

The button that navigates to this problematic screen is a very simple Navigate function with nothing else:

 

Navigate(MyBuggedScreen, ScreenTransition.Fade)

 

Another weird thing about this situation is the fact that the application works perfectly when launched in 'Edit' mode, but has this bug when launched via 'Play' mode or via my cell phone.

 

What I've tried:

- Duplicating the screen and navigating to this new one instead of the original one (same bug);

- Using 'Save As' to create a new copy of my app (same bug);

 

 

I have no idea where to look next, any suggestions are welcome!

 

Thanks!

Categories:
I have the same question (0)
  • v-xida-msft Profile Picture
    on at

    Hi @JimmyAinsley,

    Do you initialize the ShowSomeDialog variable and SomeText variable in other place within your app?

     

    I have made a test on my side, and don't have the issue that you mentioned. The screenshot as below:

    1.JPG4.JPG2.JPG3.JPG

    The GIF screenshot as below:Test1.gif

     

    Please take a try to re-create your app, and then check if the issue is solved.

    If the issue still exists, please take a try with the following workaround:

    Set the OnVisible property or OnStart property of the first screen of your app to following formula:

    UpdateContext({
     ShowSomeDialog:false,
     SomeText:""
    })

    Set the OnSelect property of the "Navigate" button to following:

    Navigate(MyBuggedScreen, ScreenTransition.Fade)

    Set the OnVisible property of the MyBuggedScreen to following:

    UpdateContext({
     ShowSomeDialog:false,
     SomeText:"Hi!"
    })

    then check if the issue is solved.

     

    Best regards,

    Kris

     

     

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