cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
JMATSUOKA135
Regular Visitor

Question about Left navigation component with double level

Hi guys,

 

I need your help here. I'm trying to build a left navigation component (double level):  in which when I select the first option, it collapses and show us the options related to the first (as a second level), so if you select the second level it navigates to a screen. The first and second option menu are record from an Excel file in OneDrive.

To do that, I worked with 2 galleries (1 nested), but still I can't obtain the correct relathionship:

. The component has a input custom property (as a table) (image 1).

.  In the Items property of the first gallery i used a Groupby, because as a table it may has repeted values and i only need 1 for each option in the left nav.

. In the Item property of the second gallery (nested) it referes to the name of the group (from gallery 1), and also in Height property i used : If(CountRows(Gallery1.AllItems)>0;CountRows(Gallery1.AllItems)*40;0).

 

Finally, when i try to use the component in my app, I'm not sure how to complete the information in the input property from the component, because i need it to refer for the information in the Excel File from OneDrive: 

 

In a button i tried this: 

ClearCollect( colLeftnav; 

Table({ 
Title: GroupBy(LefNavigation;"Titulo";"Gruptit");
Subtitle: LefNavigation.Subtitulo;
Screen: App.ActiveScreen } )
)

 

But in the component it appears an error.

 

I really appreciate your ideas to continue this Component.

1 ACCEPTED SOLUTION

Accepted Solutions
v-yutliu-msft
Community Support
Community Support

Hi @JMATSUOKA135 ,

Do you want to use component to build a left navigation component (double level)?

If your data is entered manually in the component, using component is a good solution.

For example, set the Gallery's Items: ["title1","title2","title3"]

However, since your data comes from data source, I suggest you use gallery directly.

To use this gallery in multiple screens, you just need to copy it and paste to other screens.

You could set the gallery like this:
1)gallery's Items:

GroupBy(LefNavigation;"Titulo";"Gruptit")

2)nested gallery's Items:

ThisItem.Gruptit

3)nested gallery's TemplateSize:

If(CountRows(ThisItem.Gruptit)>0,Gallery1.TemplateHeight/CountRows(ThisItem.Gruptit),0)

Then the nested table's  TemplateSize will change based on this item's record number.

9212.PNG

 

//the outside gallery's TemplateSize could only be the same for each item, it could not change based on nested table's record number. 

So even if you set nested table's height based on record number, it will not change outside gallery's TemplateSize.

 

 

Best regards,

Community Support Team _ Phoebe Liu
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

2 REPLIES 2
RandyHayes
Super User III
Super User III

@JMATSUOKA135 

Your Galeria_Navi_2 is going to need to be a Variable Height Gallery.

Otherwise it will not expand and collapse as you seem to want.  I hope that is the indicated issue you are having.

 

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.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!
v-yutliu-msft
Community Support
Community Support

Hi @JMATSUOKA135 ,

Do you want to use component to build a left navigation component (double level)?

If your data is entered manually in the component, using component is a good solution.

For example, set the Gallery's Items: ["title1","title2","title3"]

However, since your data comes from data source, I suggest you use gallery directly.

To use this gallery in multiple screens, you just need to copy it and paste to other screens.

You could set the gallery like this:
1)gallery's Items:

GroupBy(LefNavigation;"Titulo";"Gruptit")

2)nested gallery's Items:

ThisItem.Gruptit

3)nested gallery's TemplateSize:

If(CountRows(ThisItem.Gruptit)>0,Gallery1.TemplateHeight/CountRows(ThisItem.Gruptit),0)

Then the nested table's  TemplateSize will change based on this item's record number.

9212.PNG

 

//the outside gallery's TemplateSize could only be the same for each item, it could not change based on nested table's record number. 

So even if you set nested table's height based on record number, it will not change outside gallery's TemplateSize.

 

 

Best regards,

Community Support Team _ Phoebe Liu
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

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

PowerPlatform 768x460.png

Microsoft Learn

Check out our new Discover Your Career Path blog post series and get all the details.

Users online (1,309)