cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
seadude
Memorable Member
Memorable Member

Where to put Navigate() to screen Param()?

Scenario:

- Deep-link opens the PowerApp

    - Has a `screen` parameter appended to the URL

    - Example: ms-apps:////providers/Microsoft.PowerApps/apps/<my_app_id>?screen=scrWork

- Need the PowerApp to evaluate the `screen` Param() and Navigate() to correct screen

 

Tried: Placing the following code in 3 different places, each with its own ERROR!

If(
    !IsBlank(Param("screen")),
        Switch(
            Param("screen"), 
            "work", Navigate(scrWork, Fade)
        ),
    Navigate(scrHome, Fade)
)

- OnStart:

    - ERROR: Navigate is not permitted in OnSTart. Use the StartScreen property instead.

seadude_0-1655340789093.png

- StartScreen:

    - ERROR: Behavior function un an non-behavior property. You can't use the property to change values elsewhere in the app.

seadude_1-1655340789111.png

- OnVisible of the first screen (scrHome):

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

        - The error is incorrect by the way! The else statement runs contrary to the statement.

seadude_2-1655340789099.png

So... how then, should a deep link be passed to a PowerApp in this scenario?

 

@WarrenBelz ? @iAm_ManCat ? 

1 ACCEPTED SOLUTION

Accepted Solutions
Adrian_Celis
Super User
Super User

Hi @seadude 

You are correct in placing it in StartScreen property of the app, except you do not use Navigate, just use the screen name. Example:

StartScreen:

If(!IsBlank(Param("screen")),scrWork,scrHome)

View solution in original post

3 REPLIES 3
TheRobRush
Super User
Super User

I know answer but on my cellphone so if noone helps you by tomorrow i will 

_____________________________________________________________________________________
Like my answer? - Hit that Thumbs Up. Resolved the Issue? - Hit Accept as Solution.
This helps others find solutions to future issues!
Adrian_Celis
Super User
Super User

Hi @seadude 

You are correct in placing it in StartScreen property of the app, except you do not use Navigate, just use the screen name. Example:

StartScreen:

If(!IsBlank(Param("screen")),scrWork,scrHome)

Thank you very much for the prompt reply. You got me unstuck!

 

The `StartScreen` property is new to me.

 

 

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.

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 (2,819)