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 / Using a label componen...
Power Apps
Unanswered

Using a label component as menu item

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

I am using 15 different label items as my left menu along with icon. I developed the 15 different labels and icons as a component as it is used as left menu in several screens. Onclick of labels it has to navigate to respective screens. I tried to develop a custom property to specify a screen name when the label is clicked. I used a input property. Tried both screen and text , but did not get it to work, Please help. 

Categories:
  • PowerAddict Profile Picture
    7,316 Most Valuable Professional on at
    Not sure what you mean by: "I tried to develop a custom property to specify a screen name when the label is clicked. I used a input property. Tried both screen and text , but did not get it to work"

    Please provide some more details and clarity.

    ---
    If you like this reply, please give kudos. And if this solves your problem, please accept this reply as the solution.

    Thanks!
    Hardit Bhatia
    The Power Addict
    https://thepoweraddict.com
  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi

     

    I have a labels

    Label A

    Label B

    Label C and so on.. I developed a component of 15 labels and icons as left menu. I developed it as a component so that I can use the same menu in several screens.

     

    No if I click on Label A it has to navigate to Screen A and on Label B to screen B and so on..

     

    How do I accomplish that?

     

    Thanks

     

     

  • PowerAddict Profile Picture
    7,316 Most Valuable Professional on at
    By setting the OnSelect property of those labels to enable the app to navigate to the correct screens.

    For example, for label 1, the OnSelect property will be Navigate(Screen1), for label 2 Navigate(Screen2) and so on.

    Is that what you were looking for? Let le know if this helps.

    ---
    If you like this reply, please give kudos. And if this solves your problem, please accept this reply as the solution.

    Thanks!
    Hardit Bhatia
    The Power Addict
    https://thepoweraddict.com
  • poweractivate Profile Picture
    11,078 Most Valuable Professional on at

    @Anonymous 

     

    Just use the name of the screen and the Navigate function.

     

    For a Label's OnSelect, do something like this:

     

    Navigate(ScreenName)

     

    If you need a variable, what you may really need is a Collection that is a map. Something along the lines of:

     

    ClearCollect(SomeCollection, {'SomeColumn1':'Screen1Name','SomeColumn2':'Screen1Name'}

     

    Put something like the above in the OnVisible of your first screen for instance.

     

    So then you would be able to use something like this on your Label OnSelect"

     

    Navigate (First(SomeCollection).SomeColumn1 )

     

    The above example would then navigate to Screen1Name (assuming that is the name of the screen and assuming that in your collection, each column in the first record's column value correctly refers to a screen directly by name in single quotes).

     

    Check if something like above might help.

  • v-xida-msft Profile Picture
    Microsoft Employee on at

    Hi @Anonymous ,

    Do you custom components within your PowerApps app?

    Do you want to navigate to different screen when you click the different Label or Icon Compoent control?

    Why not define a Gallery component consists different Label and Icons?

     

    I have made a test on my side, please consider take a try with the following workaround:

    On your side, you could consider define a Gallery component consists different Label and Icons, then define a Input custom property within this component to receive Icon image data and Label value. Define a Output custom property within this Component to output the selected record in the Gallery Component.

    8.JPG

     

    9.JPG

     

    10.JPG

    After that, you could set up a collection to store the Icon Image data and Label data:

    11.JPG

     

    12.JPG

     

    Insert a Component into your screen, set the MenuOptions property to above collection data. Then configure the display value within the Gallery Component:

    13.JPG

    You could use the following formula to detect the Label value of current selected item from above Gallery Component:

    MenuOption_2.CurrentSelected.LabelValue

     

    Best regards,

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi 

     

    Tried that earlier. But the issue here is it's a component.

    There is a component with several labels, I then created a INPUT TEXT Custom Property. Then associated that property for Label's "OnSelect". I tried CompName.CustomPropertyName, then went to screen and gave in the screen name. It is not doing anything.

     

    I also tried Navigate(CompName.CustomPropertyName) in onselect of component for label, it says Navigate function has some errors.

    I have a lot of labels and I created them using UI team's precise standards. I guess Gallery will work, but I have to re-do all of it, so I am trying to accomplish with what I already have. Issue is triggering Navigate function on the screen using this label component. 

     

    Please help. 

     

    Thanks

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi 

     

    Tried that earlier. But the issue here is it's a component.

    There is a component with several labels, I then created a INPUT TEXT Custom Property. Then associated that property for Label's "OnSelect". I tried CompName.CustomPropertyName, then went to screen and gave in the screen name. It is not doing anything.

     

    I also tried Navigate(CompName.CustomPropertyName) in onselect of component for label, it says Navigate function has some errors.

    I have a lot of labels and I created them using UI team's precise standards. I guess Gallery will work, but I have to re-do all of it, so I am trying to accomplish with what I already have. Issue is triggering Navigate function on the screen using this label component. 

     

    Please help. 

     

    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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 243 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 190 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 135

Last 30 days Overall leaderboard