cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Purrple
Frequent Visitor

Expanding Gallery - How to only have one expand and not all?

I am setting up an expanding gallery as a navigation for my page.

There is one gallery (gal_CFTNav) which groups the items by a common category. (Groupby('CFT List', "CFTGroup", "DATA").

There is a button that indicates the name of CFTGroup

 

There is a nested gallery (gal_CFTData) which lists the DATA

 

I have set the OnSelect for the button to UpdateContext({NavVisible:true})

 

This expands all of gal_CFTData but I would prefer to only expand the navigation based on the CFTGroup button that was pressed.

What am I missing?

 

1 ACCEPTED SOLUTION

Accepted Solutions
RandyHayes
Super User
Super User

@Purrple 

You are missing that you are setting a variable to true or false.  That variable is not record specific, it is just a variable.  So all of your rows will respond to it.

Instead make your variable record specific.

Ex.  UpdateContext({NavVisible: ThisItem.CFTGroup})

Then have your visible or other property based on that.

Ex on a Visible property:  ThisItem.CFTGroup = NavVisible

 

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.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

View solution in original post

3 REPLIES 3
RandyHayes
Super User
Super User

@Purrple 

You are missing that you are setting a variable to true or false.  That variable is not record specific, it is just a variable.  So all of your rows will respond to it.

Instead make your variable record specific.

Ex.  UpdateContext({NavVisible: ThisItem.CFTGroup})

Then have your visible or other property based on that.

Ex on a Visible property:  ThisItem.CFTGroup = NavVisible

 

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.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!
Purrple
Frequent Visitor

This did not work exactly like this for me - ThisItem.CFTGroup could not be assessed, but using this logic I updated it to ThisItem.IsSelected and got the desired result.

Thank you once again for your help!

RandyHayes
Super User
Super User

@Purrple 

Yep, that will work too.  It will not be as accurate, but it would work fine.

_____________________________________________________________________________________
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.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (3,786)