I am pulling my hair out trying to understand what i am doing wrong.
I have a gallery which is reading distinct sharepoint value. This gallery is called gal_Main
Distinct(DataSource, MetricTitle.Value)
This is being through a gallery which just 4 distinct values. All good
I have placed a button called Button4 on the top of the gallery, as i want to create an expandable / collapsible section for each distinct value
On the On Select item of the button 4 , i have the following code
If(
varButton = ThisItem.Result,
Set(
varButton,
show
),
varButton = ThisItem.Result
)
I have then nested another gallery inside the gal_Main called gal_Content
the gal_content should show all the values for that distinct value. On the Items property of gal_Content i have
Filter(DataSource ,Button4.Text = MetricTitle.Value) where button4.text is the button i placed in gal_Main. Again, all good
This part all works fine. The button expands perfectly well.
But i want the button to collapse when a user selects it .
I was hoping i could create a variable on the button using the code above, and then on the visible property on gal_Content place a switch statement, but for some reason the code on the button doesn't appear to do anything.
I placed a text box to show the value of the variable varButton and its always just blank... its not returning anything.
Hope i made sense.
Can anyone please assist me?
Thanks