cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Navigate in App OnStart

Hi

I have the problem

In the first line of code  of App OnStart I wrote Navigate(pgExpressions)

and it doesn't works . what is the  problem ?

5 REPLIES 5
Pstork1
Dual Super User
Dual Super User

The problem is that App OnStart runs before the screens have completed loading.  Since the screen doesn't exist yet you can't navigate to it.

 

Instead set the default screen to be a splash screen with a timer.  When the timer expires have it do the navigate.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.
Anonymous
Not applicable

Hi . Thank you for your answer

But in other application it works perfect 

Its all dependent on timing, how big the screens are, and some settings in the power app.  I agree it will work sometimes.  But its not reliable to do it in AppStart. The workaround I've provided is the appropriate solution.  The fact that it works elsewhere is not a guarantee that it should work in this case.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.
Anonymous
Not applicable

Thank you very much 

May be do you know which application settings I need to check ? I tried to play with "Use non-blocking OnStart rule" . But It didn't help . I tried with Navigate in the first line .Nothing ! I want to try to find some ways not to add new screen 

The setting that would normally affect this is the Non-Blocking onStart rule, which you've already seen.  As I said, depending on a lot of factors trying to navigate to a screen using the OnStart code is unreliable.  There really is no option other than using a specific start screen, like a splash screen.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (5,094)