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

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Power Apps June 2021

June Power Apps Community Call

Don't miss the call this month on June 16th - 8a PDT

Top Solution Authors
Top Kudoed Authors
Users online (68,173)