web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Visible property contr...
Power Apps
Unanswered

Visible property controlled by GroupBy Item

(0) ShareShare
ReportReport
Posted on by 235

Hey everyone,

 

I have a gallery of City, State and zip. It's put together in the gallery using GroupBy.  When the user selects the "+" next to the city, state it adds all of the zip codes for the selected city,state to a collection. That collection then feeds into a textinput. Everything works great except once a selection is made i want the "+" to not be visible anymore and would like an "x" to be visible so they can delete if needed. 

 

I've attached just this portion of the app to see if anyone can figure it out. I've been stuck on this 1 problem for over a week now. I would appreciate any help.

 

Thanks

Categories:
I have the same question (0)
  • Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    @Charliemacdmv 

    Use a context variable for this.  After your groupby formula in the OnSelect property of the "+"  icon, put ;UpdateContext({var:false}) and set the visible property of the "+" icon to var.  For your "x" icon, make its OnSelect property UpdateContext({var:true}) and make its visible property !var, that way the two icons will toggle and only 1 will be shown at any single time. You will need to show the "+"  icon when you first view your gallery on the screen. So in the OnVisible property of the screen put UpdateContext({var:true}) 

  • Charliemacdmv Profile Picture
    235 on at

    @Drrickryp  Thanks for the help. That got me pretty close but it either makes all "+" appear or all "x"s appear. I need it for just the individual items. The groupby function is in the Item section of the gallery. 

    GroupBy(Filter(Table1,StartsWith(city, TextInput1.Text)),"city","state_id","DATA")

    Is that something I should look at changing?

     

    Thanks again.

    ezgif.com-gif-maker (5).gif
  • Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    @Charliemacdmv 

    ThisItem.IsSelected&&var  in the visible property of the "+" and ThisItem.IsSelected&&!var for the "x" icon.

  • Charliemacdmv Profile Picture
    235 on at

    @Drrickryp  That works sort of as well, except it only has the "+" and "x" visible on the top item. This is the same problem I was having. It has to be something with the Groupby.  I've done stuff like this before with Distinct but never had these issues. And unfortunately, I need to use the groupby function.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Vish WR Profile Picture

Vish WR 834

#2
Valantis Profile Picture

Valantis 533

#3
Haque Profile Picture

Haque 410

Last 30 days Overall leaderboard