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

Community site session details

Session Id : U+d+QFss5fPeoVIACly51U
Power Apps - Building Power Apps
Unanswered

Using a label component as menu item

Like (0) ShareShare
ReportReport
Posted on 15 Jan 2020 20:39:30 by

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. 

  • Community Power Platform Member Profile Picture
    on 17 Jan 2020 at 14:47:20
    Re: Using a label component as menu item

    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
    on 17 Jan 2020 at 14:45:19
    Re: Using a label component as menu item

    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

  • v-xida-msft Profile Picture
    on 16 Jan 2020 at 09:49:25
    Re: Using a label component as menu item

    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,

  • poweractivate Profile Picture
    11,078 Most Valuable Professional on 15 Jan 2020 at 23:41:13
    Re: Using a label component as menu item

    @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.

  • PowerAddict Profile Picture
    7,314 Most Valuable Professional on 15 Jan 2020 at 22:39:39
    Re: Using a label component as menu item
    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
  • Community Power Platform Member Profile Picture
    on 15 Jan 2020 at 21:06:15
    Re: Using a label component as menu item

    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,314 Most Valuable Professional on 15 Jan 2020 at 20:57:21
    Re: Using a label component as menu item
    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

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

Telen Wang – Community Spotlight

We are honored to recognize Telen Wang as our August 2025 Community…

Announcing our 2025 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for…

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 637 Most Valuable Professional

#2
stampcoin Profile Picture

stampcoin 570 Super User 2025 Season 2

#3
Power Apps 1919 Profile Picture

Power Apps 1919 473

Loading complete