Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Building Power Apps
Answered

Button OnSelect make group visible = false

(0) ShareShare
ReportReport
Posted on by 909 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?

 

  • Verified answer
    Prabhakar_S Profile Picture
    735 Super User 2025 Season 1 on at
    Re: Button OnSelect make group visible = false

    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.

  • Pstork1 Profile Picture
    65,906 Most Valuable Professional on at
    Re: Button OnSelect make group visible = false

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

  • wonka1234 Profile Picture
    909 Super User 2024 Season 1 on at
    Re: Button OnSelect make group visible = false

    @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
    65,906 Most Valuable Professional on at
    Re: Button OnSelect make group visible = false

    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.

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,524 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,906 Most Valuable Professional

Leaderboard