@Hockeyman9474
Let me try to explain how I have achieved this.
First use a 'Blank flexible height' gallery.
Add a label to display the District name and under that add another 'Blank flexible height' gallery which will display the locaitons in the district selected.
Now insert 2 icons: 'Up' (collpase) and 'Down' (expand) so that they are one on top of the other one and set the following properties on them
1. for the 'Up' (collapse) button:
- Visible: expandCollapse && ThisItem.IsSelected
- OnSelect: UpdateContext({expandCollapse:false})
2. for the 'Down' (expand) button:
- Visible: Not(expandCollapse && ThisItem.IsSelected)
- OnSelect: UpdateContext({expandCollapse:true})
Then on the second gallery set the Height to be If(expandCollapse && ThisItem.IsSelected,190,0) - adjust to your needs.
This should create a basic accordion gallery with minor tweaks to reflect your data sources.
Hope this makes it clearer 🙂