cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

A menu in Power Apps

I create the menu in this video: https://www.youtube.com/watch?v=3S0h2nODcxM

At 19:20 he create a collection, but that don't work in my Comonent. I add this into the OnSelect from the button: 

ClearCollect(colMenu; Table(
{
Title: "Home";
Screen: App.ActiveScreen;
Icon: Icon.Home
};{
Title: "Currency";
Screen: App.ActiveScreen;
Icon: Icon.Currency
};{
Title: "Document";
Screen: App.ActiveScreen;
Icon: Icon.Document
}
)

 

But why does that not work?

10 REPLIES 10
Pstork1
Dual Super User
Dual Super User

You are missing one of the fields in the collection.  @RezaDorrani  has a field that is a reference to the screen that you will navigate to in the component and a menuID.  In your case you point all the screens to the same reference App.ActiveScreen and don't have an ID to differentiate them.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.
Anonymous
Not applicable

@Pstork1 ok, but what is than the full code?

Anonymous
Not applicable

Oh, sorry it's the false link, it's this one: https://www.youtube.com/watch?v=dP74npyyvGc 

at 26:15

Take a look at the video somewhere around 26-28 minutes.  You'll see that he is changing the entries in the table (in the collection) to point at actual screens, not just at app.activescreen.  That is essential for the component to navigate from one screen to the next.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.
Anonymous
Not applicable

@Pstork1 I think I have the problem, if I write that into the OnSelect the error come with the name „colMenu“ that‘s the Problem with this collection, do I have to create this Collection first, because I don‘t saw this in the video?

He creates the collection at 26:16 in the video.  The only reason for creating the collection is so he doesn't have to hard code the table in each instance of the menu control in his test app.  Its common to get an error when creating a collection the first time because the name isn't recognized.  As soon as you run the app and press the button once it should go away.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.
Anonymous
Not applicable

@Pstork1 But that also don't work, I ignore the error and do the navItems to my Collection, I click the button and ... nothing happens. I stop my App and the error is there. I look into the collection menu, but there‘s no collection.

Please show me the code you are using to create the collection.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.
Anonymous
Not applicable

ClearCollect(colMenu; Table(
{
Title: "Home";
Screen: Screen1;
Icon: Icon.Home
};{
Title: "Currency";
Screen: Screen2;
Icon: Icon.Currency
};{
Title: "Document";
Screen: Screen3;
Icon: Icon.Document
}
)

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

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