Lio Djo
Lio Djo

Reputation: 129

PowerApps - If the user selects a value from the dropdown to navigate to a specific screen

I have completed all my screens in PowerApps and I am now trying to setup the navigation.

Current formula: If(Dropdown1.Selected.Value = "Employement"; Navigate('Section 3 Other Mirror',ScreenTransition.Cover)

Error: Unexpected characters. 'ParenClose' where 'Eof' is expected.

Upvotes: 0

Views: 5207

Answers (2)

Iona Varga
Iona Varga

Reputation: 547

You can make a collection in the OnStart section with for example:

[
  {
     Name: "Employers",
     ScreenName: [@Screen1]
  },
  {
    Name: "Admins",
    ScreenName: [@Screen2]
  }
]

If you put this collection on a dropdown, you could use your navigate via the OnSelect of a button as follow:

Navigate( Dropdown.Selected.ScreenName, YourTransitionStyle )

Saves a lot of rewriting in lots of places.

Upvotes: 1

Lio Djo
Lio Djo

Reputation: 129

Fixed. I had to turn on the OnSelect in order to reach the values.

Screenshot

Upvotes: 0

Related Questions