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 / Show/Hide Forms from B...
Power Apps
Answered

Show/Hide Forms from Buttons in a Gallery

(0) ShareShare
ReportReport
Posted on by 47

Hi Guys... another small bump in the road in my learning experience.  Brief outline of what I have got to work with.  

 

Ive inherited a PowerApps site with no previous experience before this week with it.  There is an page called EditScreen1 and is shown in the image attached.  What is setup right now are 7 individual buttons each with their own OnSelect which then shows/hides one of 7 Forms (each containing many datacards) in the rest of the screen.  

 

Set(Form1,true);Set(Form2,false);Set(Form3,false)... etc covering all 7 buttons. On the 2nd button... Form2 is Set to True, etc. 

 

Now I've created a nice flashy button gallery to replace those separate buttons.. doing all the colour changes I want when clicked, etc... so how do I now go about giving each of these "buttons" in the gallery their own OnSelect... as you cant select them separately.  Im going to assume something code orientated for the OnSelect of the Gallery... and possibly Items too.  

 

Again you think this would be easy stuff lol.  My brain tells me it should be something like.. For the OnSelect on the main button (currently not set to anything)... If(ThisItem.IsSelected, Set(Form1,true);Set(Form2,false), etc.  but thats not going to work unless I can nestle lots of IF statements (I can in VBA lol).  Ive seen on Reza's video where this is done using the Switch command but involves 2 galleries and not a gallery and forms.. and im not sure if they differ syntax wise. 

 

Any help is truly appreciated while I get up to speed quickly.  Not doing too bad for a week 🙂

 

Thanks again

Button Menu.png
Categories:
I have the same question (0)
  • Verified answer
    Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    @TheJayB 

    You don't have to re-invent the wheel.  @RezaDorrani  has a great video that does exactly what you are describing at https://www.youtube.com/watch?v=KjUJZr5Vn_Y 

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 358 Most Valuable Professional

#2
11manish Profile Picture

11manish 214 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 185

Last 30 days Overall leaderboard