cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
aleenav
Helper I
Helper I

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 III
Dual Super User III

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.

Hi . Thank you for your answer

But in other application it works perfect 

Pstork1
Dual Super User III
Dual Super User III

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.

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 

Pstork1
Dual Super User III
Dual Super User III

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
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

PowerPlatform 768x460.png

Microsoft Learn

Check out our new Discover Your Career Path blog post series and get all the details.

Users online (920)