Power Apps StartScreen OnStart

Microsoft have announced they will be retiring Navigate in Power Apps App.OnStart. This change has resulted in apps created before March 2013 that use deep linking to stop working. This blog post outlines how to fix the issue and how to use the new App.StartScreen function instead.

 

With the introduction of the App.StartScreen function in Power Apps, Microsoft have started the process for retiring using Navigate in App.OnStart. This means the traditional method of deep linking by routing to a screen using a URL parameter will not work. 

 

Apps created before 2013

Apps created before 2013 may have the 'Enable Navigate' function disabled which will cause the OnStart navigate code to stop working. To restore this functionality go to Settings > Upcoming features > Retired and switch it back on.

 

Using App.StartScreen

As the OnStart navigate function will be retired. It is recommended to switch to using App.StartScreen for conditional navigation.

 

Old method using App.OnStart

Collect(colOrders, Orders );
If( 
  Param( "AdminMode" ) = "1", 
  Navigate( AdminScreen ),
  Navigate( HomeScreen )
)

 

New method using App.StartScreen

App.OnStart = Collect( colOrders, Orders );
App.StartScreen = If( Param( "AdminMode" ) = "1", AdminScreen, HomeScreen )

 

If you are using complex logic such as setting a global variable using a lookup in your OnStart based on an recevied parameter, there isn't an alternative at the moment. You will need to enable navigation in OnStart until Microsoft address this.

There is a great blog post by Greg Lindhorst that talks about this in more detail.