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
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Power Platform Call June 2022 768x460.png

Power Platform Community Call

Join us for the next call on June 15, 2022 at 8am PDT.

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.

PA.JPG

New Release Planning Portal (Preview)

Check out our new release planning portal, an interactive way to plan and prepare for upcoming features in Power Platform.

Top Solution Authors
Top Kudoed Authors
Users online (3,664)