cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
powergirl_2002
Level: Powered On

Using a label component as menu item

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. 

7 REPLIES 7
Super User
Super User

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
powergirl_2002
Level: Powered On

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

 

 

Super User
Super User

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
dynamicsedge
Level 10

Re: Using a label component as menu item

@powergirl_2002 

 

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.

Community Support Team
Community Support Team

Re: Using a label component as menu item

Hi @powergirl_2002 ,

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 Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
powergirl_2002
Level: Powered On

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

powergirl_2002
Level: Powered On

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

Helpful resources

Announcements
Better Together’ Contest Finalists Announced!

'Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Join THE global Microsoft Power Platform event series

Attend for two days of expert-led learning and innovation on topics like AI and Analytics, powered by Dynamic Communities

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

thirdimage

Microsoft Business Applications Virtual Launch

Join us for the Microsoft Business Applications Virtual Launch Event on Thursday, April 2, 2020, at 8:00 AM PST.

thirdimage

Community Summit North America

Innovate, Collaborate, Grow - The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors
Users online (8,969)