web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Navigate to screen fro...
Power Apps
Answered

Navigate to screen from dropdown

(0) ShareShare
ReportReport
Posted on by 25

I have a dropdown pulling the options from a Sharepoint list. I was using If Statements to allow the user to navigate to the screen they selected. E.g.:

 

If(Dropdown.SelectedText.Value = "ABC",

Navigate("ABC")

 

The problem is that I have reached the limit; I have too many options, and PowerApps does not allow more than 50 nested statements.

 

Is there a way I can write a statement that does not require nested if statements, basically something like:

 

If(Dropdown.SelectedText.Value = ~Screen Name~,

Navigate(~Screen Name~)

 

 

Categories:
I have the same question (0)
  • WarrenBelz Profile Picture
    156,419 Most Valuable Professional on at

    Hi @Data555 ,

    You can use Switch

    Switch(
     Dropdown.Selected.Value,
     "ABC",
     Navigate(ABC),
     "XYZ",
     Navigate(XYZ),
     .........
    )

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    MVP (Business Applications)   Visit my blog Practical Power Apps

  • Data555 Profile Picture
    25 on at

    It gives me the same issue: "expression is nested too deep"

  • Rajkumar_M Profile Picture
    3,747 Moderator on at

    Hi,

    Try this


    Switch(
    Dropdown.SelectedText.Value,
    "ABC", Navigate(ABC),
    "DEF", Navigate(DEF),
    "GHI", Navigate(GHI),
    // Add more cases as needed
    Navigate(DefaultScreen) // Default case if no match is found
    )


    Switch Syntax Switch( Formula, Match1, Result1 [, Match2, Result2, ... [, DefaultResult ] ] ) 

    Reference link : How To Use PowerApps Switch Function (with examples) (zeitgeistcode.com)

    Thanks!
    If my response has been helpful in resolving your issue, I kindly request that you consider clicking "Accept as solution" and "giving it a thumbs up" as a token of appreciation.

  • Rajkumar_M Profile Picture
    3,747 Moderator on at

    Hi @Data555 ,

    The maximum nesting level for expressions in PowerApps is 8. This means that you can have up to 8 levels of nested conditions or actions within your PowerApps formulas or flows. If you exceed this limit, you will encounter an error indicating that the maximum nesting limit of 8 has been exceeded.

    One possible solution is to create a separate collection or data source that maps the dropdown values to the corresponding screen names. Here's an example:

             1. Create a collection or data source that maps the dropdown values to screen names. You can use a table or               collection like this:

              Collection :  

    Collect( ScreenMapping,
    {
    DropdownValue: "ABC",
    ScreenName: ABC
    },

    {
    DropdownValue: "CBD",
    ScreenName: ABC
    }
    )

    Rajkumar_404_0-1689694298564.png

     

    1. Modify your formula to use the Lookup function to find the appropriate screen name based on the dropdown value:

       
      Navigate(LookUp(ScreenMapping, DropdownValue = Dropdown.Selected.Value).ScreenName)
      


      In this formula, "ScreenMapping" refers to the name of the collection or data source created in step 1. The Lookup function searches for a record where the DropdownValue matches the selected dropdown value and returns the corresponding ScreenName value. The Navigate function then navigates to that screen.


      Thanks!

      If my response has been helpful in resolving your issue, I kindly request that you consider clicking "Accept as solution" and "giving it a thumbs up" as a token of appreciation.

  • Data555 Profile Picture
    25 on at

    I created a table like you said.

     

    My formula:

     

    Navigate(LookUp(MyTable, DropdownValue = DropdownCustomers.SelectedText.Value).ScreenName)

     

    I am getting this error:

    The first argument of 'Navigate' should be a control or screen.

     

  • WarrenBelz Profile Picture
    156,419 Most Valuable Professional on at

    @Data555 ,

    Edit: I posted this responding to your post without reading further up, although as I do not "come in" on active conversations, I did not expect anything there.

    The fact you have over 50 screens is a bit scary to start with as far as Power Apps control maximums are concerned. This may work - at AppOnStart

    ClearCollect(
     colScreens,
     Table(
     {Value: "ABC", ScreenName: ABC},
     {Value: "XYZ", ScreenName: XYZ},
     .........
     )
    )
    

    then

    Navigate(
     LookUp,
     colScreens,
     Value = Dropdown.Selected.Value
    ).ScreenName

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    MVP (Business Applications)   Visit my blog Practical Power Apps

  • Rajkumar_M Profile Picture
    3,747 Moderator on at

    Update your formula like this Navigate(LookUp(MyTable, DropdownValue = DropdownCustomers.Selected.Value).ScreenName)


  • Verified answer
    cdwhite Profile Picture
    1,069 Most Valuable Professional on at

    Make sure your table is actually housing the screen names. You can tell this has worked as the format for the screen names in the collection build will be like so:
    ColScreenHelp.png 

    The OnChange property of your drop down to do the navigation should then have the same formatting:
    ColScreenHelp2.png
    Tested on my end, all working as expected.
    ------------------------------------------------------------------------------------------------------------------------------
    If I've answered your question, please mark your post as Solved. You can accept more than one post as a solution.

    If my response was a good one, please give it a Thumbs Up!

    Visit my blog: https://platformsofpower.net

  • WarrenBelz Profile Picture
    156,419 Most Valuable Professional on at

    @cdwhite ,

    It seems everyone is having a go here. Please tag me if you need my assistance.

  • Data555 Profile Picture
    25 on at

    It works beautifully. Thank you 🙂

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 355 Most Valuable Professional

#2
11manish Profile Picture

11manish 209 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 150 Super User 2026 Season 2

Last 30 days Overall leaderboard