cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
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
Highlighted
Community Support
Community Support

Re: Question about Left navigation component with double level

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
Highlighted
Super User III
Super User III

Re: Question about Left navigation component with double level

@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. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
Highlighted
Community Support
Community Support

Re: Question about Left navigation component with double level

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
Community Conference

Power Platform Community Conference

Find your favorite faces from the community presenting at the Power Platform Community Conference!

Watch Now

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (6,874)