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 / Getting error with try...
Power Apps
Answered

Getting error with trying to change visibility of a screen

(0) ShareShare
ReportReport
Posted on by

I'm using a collection to determine if the a screen should be shown. I've tested that the given value can end up in the collection but it's giving me an error that it will always navigate away and won't allow me to set that.

ERROR: "Navigate cannot be used here since it would automatically always navigate away from this screen"

MY FUNCTION in the onVisible attribute of a screen: If("Transmission Region" in Screens, false, Navigate('Materials Inspec Screen'))

the idea was that if it wasn't in the collection to move on to the next screen.

Categories:
I have the same question (1)
  • eka24 Profile Picture
    20,923 on at

    "Transmission Region" in Screens. Can you explain what this represent?

  • Community Power Platform Member Profile Picture
    on at

    @eka24 

    "Transmission Region" is the current screen and screens is the collection of all of the selected screens. 

    so, if the current screen isn't in the collection it moves on to the next screen which would be "Materials Inspec Screen"

  • Verified answer
    timl Profile Picture
    36,391 Super User 2025 Season 2 on at

    Hi @Anonymous 

    The problem you're facing here is that it isn't possible to call the Navigate function from the OnVisible property of a screen.

    There are more details in the post beneath, including the following workaround.

    https://powerusers.microsoft.com/t5/Building-Power-Apps/Why-we-can-not-use-Navigate-in-OnVisible/td-p/73148 

     


    There is a simple workaround with using a button or any other control with OnSelect property and calling the Select(YourButton) to execute the Navigate() function.

    For example, add a button and change its OnSelect to:
    Navigate(MainMenu_Screen,None)

    Now in the OnVisible property change your code to this:

    UpdateContext({LoadingText:"Searching for your name..."}); Set( _UserProfile, Office365Users.MyProfile() ); If( !IsBlank(_UserProfile), Select(Button1), UpdateContext({LoadingText:"Failed to load your profile. Please restart the App"}) )

     

     

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 711 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 319 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard