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?
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.
Change the dropdown to also set the value of the variable in the OnChange or ONSelect property
@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?
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.
WarrenBelz
146,524
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
65,906
Most Valuable Professional