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.
Solved! Go to Solution.
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.
//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,
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.
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.
//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,
This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.
Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.
User | Count |
---|---|
196 | |
67 | |
46 | |
41 | |
28 |
User | Count |
---|---|
255 | |
121 | |
84 | |
80 | |
80 |