cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
nduati
Frequent Visitor

How to Launch an External Link using MenuComponent navigation

Hello people,

 

How can i have one of the menuitems  launch an external URL link, rather than the normal App.ActiveScreen in my menu component. The below approach throws an error not unless i stick to App.Activescreen

 

Table(
  {
    MenuLabel: "Home",
    MenuIcon: Icon.Home,
    MenuScreenNavigate: App.ActiveScreen,
    MenuID: 1
  },
   {
    MenuLabel: "Document",
    MenuIcon: Icon.Document,
    MenuScreenNavigate: App.ActiveScreen,
    MenuID: 2
  }, {
    MenuLabel: "Reports",
    MenuIcon: Icon.Trending,
    MenuScreenNavigate: Launch("www.someurl.com"),
    MenuID: 3
  }
 )

 

My OnSelect property on the Click button and MenuIcons is set to Navigate(ThisItem.MenuScreenNavigate, ScreenTransition.Cover) which only works for App.ActiveScreen. Kindly help

 

1 ACCEPTED SOLUTION

Accepted Solutions
RandyHayes
Super User
Super User

@nduati 

You are mismatching datatypes.

Your MenuScreenNavigate is implied to be an App screen object.  Then later you try to set it to a Launch object (which is no datatype).

Either add a new column to your table records called something like LaunchTo: and set it to the url you want, or reconsider what you are doing with MenuScreenNavigate as you seem to have them just going to the active screen.

 

I hope this is helpful for you.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

View solution in original post

3 REPLIES 3
RandyHayes
Super User
Super User

@nduati 

You are mismatching datatypes.

Your MenuScreenNavigate is implied to be an App screen object.  Then later you try to set it to a Launch object (which is no datatype).

Either add a new column to your table records called something like LaunchTo: and set it to the url you want, or reconsider what you are doing with MenuScreenNavigate as you seem to have them just going to the active screen.

 

I hope this is helpful for you.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!
mjackson122
Helper I
Helper I

Hello,

I am attempting the same setup I have a component navigation menu where some items will be links to direct pages within the app. Then the remaining items in the table will go to external links. My table setup for items in my component is:

 

Table(

{Value: "Item 1", Image: image, Screen: App.ActiveScreen, LaunchLink: ""} - this will go to page within the app

{Value: "Item 1", Image: image, Screen: "", LaunchLink: Launch('www.google.com")}

 

Then in my OnStart I have:

Set(colNavMenu,

{Value: "Item 1", Image: image, Screen: 'Home", LaunchLink: ""}

{Value: "Item 1", Image: image, Screen: "", LaunchLink: " Launch('www.google.com")}

 

Thanks

 

 

RandyHayes
Super User
Super User

@mjackson122 

What issue are you having?  You might want to start a new post on the issue you are having as this is an old and closed post.

You can @ mention me in the post if you want me to take a look.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

Helpful resources

Announcements
PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

Top Solution Authors
Top Kudoed Authors
Users online (1,326)