cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper II
Helper II

creating a table in Canvas app to be used in the Hamburger icon

I am trying to create a table for the on Start of a canvas app to populate the Hamburger icon 

The code I have is 

 

Set(TableMenu,Table({ ScreenX: "All Opps", Screen: ScreenListAllOpps},
{ ScreenX: "Won Opps", Screen: ScreenListWonOpps },
{ ScreenX: "Lost Opps", Screen: ScreenListeLostOpps },
{ScreenX: "Home", Screen: Home } ));

 

My Choices are as defind as 

["AllOpps","WonOpps","LostOpps","Home"]

 

However, this will give me an error of invalid argument - any ideas would be appreciated.

Thanks,

Sigi

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support
Community Support

Re: creating a table in Canvas app to be used in the Hamburger icon

Hi @shawkinson ,

Have you fired the OnStart property of App control in your app again?

Is the TableMenu variable populated with proper records?

 

I have made a test on my side, and don't have the issue that you mentioned. Please make sure the TableMenu variable in your app has been populated with proper records.

When you made changes to your Set(...) formula in the OnStart property of App, you need to re-fire the OnStart property again, then the changes would take effect in your app.

 

Please consider re-load your app, or click "Run OnStart" option as below to fire the OnStart property again:8.JPG

 

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.

View solution in original post

17 REPLIES 17
Highlighted
Dual Super User
Dual Super User

Re: creating a table in Canvas app to be used in the Hamburger icon

Hi @shawkinson 

 

For the gallery just use items property as TableMenu and use ThisItem.ScreenX to get the name ThisItem.Screen will give you the context to the screne object to Navigate to

 

whatever your data source is, just use Items property as TableMenu

and then refere to the 2 properties within the Table

 

Regards,

Reza Dorrani

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

Highlighted
Super User
Super User

Re: creating a table in Canvas app to be used in the Hamburger icon

@shawkinson 

Instead of using the Set function I suggest using a Collection instead.

 

Click on the App in the Screens menu and change the OnStart property to the following code.  Replace value with the text you want to display on the menu and navlink with the Screen Name in PowerApps.  Notice there are no quotes surrounding the navlink field item.

 

ClearCollect(
    TableMenu,
    {
        value: "All Opps",
        navlink: ScreenListAllOpps
    },
    {
        value: "Won Opps",
        navlink: ScreenListWonOpps
    },
    {
        value: "Lost Opps",
        navlink: ScreenListLostOpps
    },
    {
        value: "Home",
        navlink: Home
    }
);

 

Now create the gallery that will hold your Hamburger menu and put the following code in the Items property

 

TableMenu

 

Finally create each screen having the same name as the navlink field if you have not already done so

 

  • InboxScreen
  • OutboxScreen
  • ArchiveScreen
  • SpamScreen

 

I think that'll just about do it!  Let me know if you have questions.

 

---
Please click "Accept as Solution" if my response helped to solve your issue so that others may find it more quickly. If your thought the post was helpful please give it a "Thumbs Up."

Highlighted
Helper II
Helper II

Re: creating a table in Canvas app to be used in the Hamburger icon

Thank your for your reply - 

I have added the code below to the OnStart of the App, however am getting errors - see attached screenshot - the Gallary1 item has been set to Table Menu - I have a screen created called "AllOpps". see attached screenshots - getting erros on the on start of the app

see attached screen shots.

Regards, 

Sigi

Highlighted
Dual Super User
Dual Super User

Re: creating a table in Canvas app to be used in the Hamburger icon

@shawkinson 

 

App On Start (right click and run on start to ensure it loads the data when in edit mode of PowerApp)

 

Set(TableMenu,Table({ ScreenX: "All Opps", Screen: ScreenListAllOpps},
{ ScreenX: "Won Opps", Screen: ScreenListWonOpps },
{ ScreenX: "Lost Opps", Screen: ScreenListeLostOpps },
{ScreenX: "Home", Screen: Home } ));

 

Ensure ScreenListWonOpps,ScreenListeLostOpps,Home,ScreenListAllOpps are actual screen names in the formula above

 

For the screen list control

Set Items property to TableMenu

Do not hardcode the list there

 

So for the list box set properties as below

Capture.PNG

 

Regards,

Reza Dorrani

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

 

 

Highlighted
Helper II
Helper II

Re: creating a table in Canvas app to be used in the Hamburger icon

Thank  you - I am no longer getting an error on the formula, but the Hamburger Icon does not do anything when clicking on it - also, now that the formula works, the code I have on the OnSelect of the Icon is below. 

Any ideas on how to fix that?

Sigi

 

If(menuVisible,UpdateContext({menuVisible: false}),UpdateContext({menuVisible: true}))

Highlighted
Dual Super User
Dual Super User

Re: creating a table in Canvas app to be used in the Hamburger icon

Hi @shawkinson 

 

What is the Visible property of the List control 

 

The Visible property should be set to:

menuVisible

 

Regards,

Reza Dorrani

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

Highlighted
Helper II
Helper II

Re: creating a table in Canvas app to be used in the Hamburger icon

Thanks you for your response - it is set to Visible and it diplays and hides on the screen based on the click of the hamburger icon, however the default values are 1, 2, 3 - I also don't want the list box to show, but rather have the hamburger icon open the choices up as a dropdown

Thank,

Sigi

Highlighted
Dual Super User
Dual Super User

Re: creating a table in Canvas app to be used in the Hamburger icon

Hi @shawkinson 

 

What default values are 1,2,3 ?? share screenshot please - not sure what you are referring to

 

If you dont want list box to show initilaly, then onvisible property of the screen use

UpdateContext({menuVisible: true})

 

Regards,

Reza Dorrani

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

Highlighted
Helper II
Helper II

Re: creating a table in Canvas app to be used in the Hamburger icon

Sorry, I am new to this and it confuses me a bit - I have  list box that I have added to the screen - When I click on the Hamburger Icon it hides the box and brings it back up -

I would like the list box to stay so the user can select a value i.e. Open Opps, won Opps, ... which than will take you to the new screen - I was trying to do that with the hamburger icon having a dropdown - either or both would be fine. Sorry if this seems confusing  

See attached Screen shot

 

 

Helpful resources

Announcements
secondImage

Demo-Extravaganza 2020

Check out these cool Power Apps & vote on your favorite!

secondImage

Community Highlights

Check out whats happening in Power Apps

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (12,921)