Skip to main content

Notifications

Power Apps Pro Dev & ISV
Answered

Canvas App with Navigation template

Posted on by 364
 
Hi,
 
I have created a Left Navigation menu template and added across all screens and it's working as expected.
 
Here is my navigation component Table
 
Table(
 
{MenuLabel: "Home",
 
MenuIcon: Icon.Home,
 
MenuScreenNavigate: App.ActiveScreen,
 
MenuID: 1,

},
 
{MenuLabel: "Events Screen",
 
MenuIcon: Icon.CalendarBlank,
 
MenuScreenNavigate: App.ActiveScreen,
 
MenuID: 2,
 
},

{MenuLabel: "Members",
 
MenuIcon: Icon.People,
 
MenuScreenNavigate: App.ActiveScreen,
 
MenuID: 3,

})
 
Added the following code on App Start property.
 
Set(leftMenuforAdmin, Table(
 
{MenuLabel: "Home",
 
MenuIcon: Icon.Home,
 
MenuScreenNavigate: scrHome,
 
MenuID: 1

},
 
{MenuLabel: "Events",
 
MenuIcon: Icon.CalendarBlank,
 
MenuScreenNavigate: scrAllEvents,
 
MenuID: 2
 
},
 
{MenuLabel: "Members",
 
MenuIcon: Icon.People,
 
MenuScreenNavigate: scrManageMembers,
 
MenuID: 3
 
});
 
Added navigation component to all screens and it's working as expected. Now I would like to new links to the navigation table but I want to use Launch() function instead of App.Activescreen.
 
First 3 links should use App.Activescreen and the new links should use Launch() to open external links in a new window.
 
I added one more column with Launch() function couldn't expected results. Can anyone provide me ideas to achieve this functionality.
 
Any help would be greatly appreciated.
 
  • aaedla Profile Picture
    aaedla 364 on at
    Canvas App with Navigation template
    @FLMike, Thank you Mike for your comments.  I was able to resolve this by adding two columns as mentioned in the code which was almost similar to your answer.
  • Verified answer
    aaedla Profile Picture
    aaedla 364 on at
    Canvas App with Navigation template
    At last I was able resolve this.
     
    Added two more properties as below 
     
     
     
    Table(
     
    {MenuLabel: "Home",
     
    MenuIcon: Icon.Home,
     
    MenuScreenNavigate: App.ActiveScreen,
     
    MenuLaunch: LaunchTarget.New,
     
    MenuType:"Screen",
     
    MenuID: 1
     
    },
     
    {MenuLabel: "Events Screen",
     
    MenuIcon: Icon.CalendarBlank,
     
    MenuScreenNavigate: App.ActiveScreen,
     
    MenuLaunch: LaunchTarget.New,
     
    MenuType:"Screen", 
     
    MenuID: 2
     
    },
     
    {MenuLabel: "Members",
     
    MenuIcon: Icon.People,
     
    MenuScreenNavigate: App.ActiveScreen,
     
    MenuLaunch: LaunchTarget.New,
     
    MenuType:"Link",
     
    MenuID: 3,
     
    });
     
    Added the following code for OnSelect Property of the gallery of the component.
     
    If(ThisItem.MenuType="Link", Launch(ThisItem.MenuLaunch),Navigate(ThisItem.MenuScreenNavigate))
     
    Added the following code on App Start property.
     
    Table(
     
    {MenuLabel: "Home",
     
    MenuIcon: Icon.Home,
     
    MenuScreenNavigate: scrHome,
     
    //MenuLaunch: "", //No need to add 
     
    MenuType:"Screen",
     
    MenuID: 1
     
    },
     
    {MenuLabel: "Events",
     
    MenuIcon: Icon.CalendarBlank,
     
    MenuScreenNavigate: scrAllEvents,
     
    //MenuLaunch: "", //No need to add
     
    MenuType:"Screen",
     
    MenuID: 2
     
    },
     
    {MenuLabel: "Members",
     
    MenuIcon: Icon.People,
     
    //MenuScreenNavigate:,  //no need to this for link
     
    MenuLaunch: "Google.com",
     
    MenuType:"Link",
     
    MenuID: 3
     
    });
  • Suggested answer
    FLMike Profile Picture
    FLMike 23,258 on at
    Canvas App with Navigation template
    Hi,
     
    I am not sure what you mean by you added a column for Launch
     
    I think, what you have is pretty good.
     
    What you could do, is add an extra column called External and make it a boolean.
     
    Put true or false
     
    Then when they click, Check if its External and if so use Launch and MenuScreenNavigate would actually be the URL
    But if its false then its just a Navigate
     
    If this helps please mark as the answer
     

Helpful resources

Quick Links

Welcome to the Power Platform…

We are thrilled to unveil the newly-launched Power Platform Communities!…

Community Update Sept 16…

Power Platform Community Update…

Welcome to the new Power Platform Community!…

We are excited to announce our new Copilot Cookbook Gallery in the Community…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 140,719

#2
RandyHayes Profile Picture

RandyHayes 76,308

#3
Pstork1 Profile Picture

Pstork1 63,355

Leaderboard