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 / Button OnSelect make g...
Power Apps
Answered

Button OnSelect make group visible = false

(0) ShareShare
ReportReport
Posted on by 920 Super User 2024 Season 1

hi,

 

I have a button that on select I want to make my group (contains buttons, text niputs, labels, rectangles) all invisible.

 

OnSselect propety - conclu_popup.Visible = false

 

But they arent going invisible? why is this?

 

Categories:
I have the same question (0)
  • Pstork1 Profile Picture
    69,573 Most Valuable Professional on at

    You can't change control properties directly at runtime.  Set the Visible property of the group to a variable and then set the variable to false in the onSelect property.

  • wonka1234 Profile Picture
    920 Super User 2024 Season 1 on at

    @Pstork1  gotcha, but i make the "group" visible based on a dropdown choice 

     

    Ie Visible property for group - If(DataCardValue40_1.Selected.Value = "New", true, false)

     

    Can I put something in DataCardValue40_1 to set the variable if the value is New in the dropdowm?

  • Pstork1 Profile Picture
    69,573 Most Valuable Professional on at

    Change the dropdown to also set the value of the variable in the OnChange or ONSelect property

  • Verified answer
    Prabhakar_S Profile Picture
    735 Moderator on at

    Hi @wonka1234 ,

     

    You can use a variable in Power Apps to control the visibility of a group based on the value selected in a dropdown. Here's how you can achieve that:

     

    Create a variable in Power Apps. You can do this in the "OnVisible" property of the screen or in the app's variables section. Let's call it ShowGroup:

     

    Set(ShowGroup, false) // Initialize the variable as false

     

    In the group's Visible property, use the ShowGroup variable to control its visibility:

     
    ShowGroup

     

    Now, in the OnChange property of your dropdown (DataCardValue40_1 in your case), you can set the ShowGroup variable based on the selected value. If the selected value is "New," set ShowGroup to true, otherwise set it to false:

     
    If(DataCardValue40_1.Selected.Value = "New", Set(ShowGroup, true), Set(ShowGroup, false))

     

    With this setup, when the user selects "New" in the dropdown, the ShowGroup variable will be set to true, making the group visible. If any other value is selected, the variable will be set to false, hiding the group.

     

    Thanks!!!

     

    Please consider marking my response as the accepted solution if it successfully resolves your concern. If you found the information beneficial in other aspects, kindly express your appreciation by giving it a thumbs-up.

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 June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 324 Most Valuable Professional

#2
11manish Profile Picture

11manish 193

#3
Valantis Profile Picture

Valantis 138

Last 30 days Overall leaderboard