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 / How to change Screens ...
Power Apps
Answered

How to change Screens with OnSelect using components?

(0) ShareShare
ReportReport
Posted on by 80
I got this component field:  how do I upon on click change the screens 
I am using TargetScreen: App.ActiveScreen, how should I change it to solve the error message?
I have the same question (0)
  • Suggested answer
    Daniel Bocklandt Profile Picture
    5,151 Super User 2026 Season 1 on at
    Hey Philbert9879,
     
    Could I ask you what you are trying to achieve? 
    What you doing right now will just keep you to stay on the screen that you are on right now. App.ActiveScreen is the Screen that is visible at the moment
     
    so your If Statement will always result to being wrong since you have it on Home screen and this will always result in you staiyng on the home screen since every target screen is App.ActiveScreen. 
     
    Either you use The actual Screen titles to get your table to work or you can use a Switch statement something like this: 
    If(ThisItem.Title<>Actual Screen name or title, 
      Navigate(
        Switch(
          ThisItem.Title, 
          "My Leave Balance",
          'title of Leave balance screen',
          "Company Holiday",
          'Expected Screen')
    )
    )
    If this Solved your problem please accept it as solution so others can find it as well. 
    If it helepd in any other way consider giving it a like so wa can keep supporting eachother. 
     
  • Verified answer
    Nandit Profile Picture
    1,568 Moderator on at
     
    Collect all your navigation items in a variable using OnStart:
    Set(
        colSidebarMenu,
        Table(
            {
                Title: "My Leave Request",
                Screen: LeaveBalance
            },
            {
                Title: "My Leave Balance",
                Screen: LeaveRequest
            }
        )
    )
    Add a Custom Input property to your Component, "ItemsTable", and add the following code it:
    Table(
        {
            Title: "Item 1",
            Screen: App.ActiveScreen
        },
        {
            Title: "Item 2",
            Screen: App.ActiveScreen
        }
    )
    In your Component, update the Items property of your Gallery to 
    ComponentName.ItemsTable
    OnSelect Property of your Gallery:
    Navigate(ThisItem.Screen)
    Add your Component to the screens and add your Variable to the ItemsTable input property:
    colSidebarMenu
    And that's it!
     
    Here's step-by-step guidance on this topic by Matthew Devaney: https://www.matthewdevaney.com/power-apps-navigation-menu-component/
     
    Hope this helps. 
     
    Kind regards. 
    Nandit
     
    If this answers your query, please mark this response as the answer.
    If its helpful, please leave a like. Thanks!

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 505

#2
WarrenBelz Profile Picture

WarrenBelz 502 Most Valuable Professional

#3
Haque Profile Picture

Haque 324

Last 30 days Overall leaderboard