cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
dev-harrisonw
Frequent Visitor

How to make group visible if certain gallery item selected

79e6a3d32a2a2949b12eea1313521b4c.png

 

                                                                                                                                                                                                      

 

I'm trying to hide a certain group of text, based on the selection of the gallery item (above the selected group).

 

For example, if the gallery item 'Call' is selected, show the group containing the date information - if any other gallery item is selected, hide the date.

 

Quite new to PowerApps, any support would be hugely appreciated, hoping to learn from your solutions. 😊 

1 ACCEPTED SOLUTION

Accepted Solutions
RandyHayes
Super User
Super User

@dev-harrisonw 

Set the Visible property of your controls to:

   yourGallery.Selected.Value = "Call"

 

Now - without knowing the Items property of your Gallery, I am making the assumption that the Items table has records with a Value column in them, and in that column is the text displayed in your buttons.

If that is not the case and you are lost on determining it, please provide the Items property of your Gallery.

 

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

5 REPLIES 5
RandyHayes
Super User
Super User

@dev-harrisonw 

Set the Visible property of your controls to:

   yourGallery.Selected.Value = "Call"

 

Now - without knowing the Items property of your Gallery, I am making the assumption that the Items table has records with a Value column in them, and in that column is the text displayed in your buttons.

If that is not the case and you are lost on determining it, please provide the Items property of your Gallery.

 

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!

Perfect! Thanks for your help Randy ❤️

@RandyHayes Now how do I apply this to multiple options, for example - emails, leads and opportunities but not calls 

RandyHayes
Super User
Super User

@dev-harrisonw 

Same concept - Set the Visible property of what you want to be visible based on the selection to:

   yourGallery.Selected.Value = "selection"

 

Just replace selection above with the proper gallery text that designates it to be visible.

 

Also, if you have some that need to be visible in multiple conditions, then you can use this as well.

   yourGallery.Selected.Value in "-Call-Lead-"

 

Just be careful with the above as you are expecting to have dissimilar values to match properly.

For example, if your Gallery had "Email" and "Previous Emails" in it, then with that formula:

   yourGallery.Selected.Value in "-Previous Emails-Call-"

The control would be visible both if a user selected Email or Previous Emails - which was not the desired result.

So, if your text values don't really overlap like that, you can use this shortcut method.

Also, the dashes in the above are just arbitrary spacers, they mean nothing.

 

 

_____________________________________________________________________________________
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!
Jltitus
Helper III
Helper III

@RandyHayes  How would this work in the following?

 

I have a gallery list that has classes (ThisItem.Title) and sessions (ThisItem.SessionDateTime) and  an icon for the user to select indicating they want to add the session.

 

When the user selects the icon, I want all other items listed in the gallery to hide and the yes/no buttons to display. 

I've created a variable (varSessionAdd) so that when the user selects the icon in the list a confirm and cancellation button display.. but I can't figure out how to just display the one class the user selected when they selected the icon.

Helpful resources

Announcements
Ignite 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Power Apps Africa Challenge 2022

Power Apps Africa Challenge

Your chance to join an engaging competition of Power Platform enthusiasts.

Super User 2 - 2022 Congratulations

Welcome Super Users

The Super User program for 2022 - Season 2 has kicked off!

September Events 2022

Check out all of these events

Attend in person or online, there are incredible conferences and events happening all throughout the month of September.

Users online (3,934)