cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
New Member

toggle a buttons visibility on parent select

I need to toggle the Visible property of a button, so that the button only shows up for the item(the row i guess) in the gallery that has been selected. 

 

I tried to put a function in the Visible property of the button as follows: 

 

If(Parent.Selected = true, true, false)

but this did not work as i had hoped, how can I achieve this. 

I know i could probably put a button not within the gallery and grab the selected item, but i would prefer to have the button inside the gallery. 

 

Thanks for any help!

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Power Apps
Power Apps

Re: toggle a buttons visibility on parent select

You can access the IsSelected property from the ThisItem object in a row to check whether it's selected. If you set the Visible property of your button to

ThisItem.IsSelected

Which is equivalent to

If(ThisItem.IsSelected, true, false)

Then you should see the button only on the selected row.

Hope this helps!

View solution in original post

2 REPLIES 2
Highlighted
Power Apps
Power Apps

Re: toggle a buttons visibility on parent select

You can access the IsSelected property from the ThisItem object in a row to check whether it's selected. If you set the Visible property of your button to

ThisItem.IsSelected

Which is equivalent to

If(ThisItem.IsSelected, true, false)

Then you should see the button only on the selected row.

Hope this helps!

View solution in original post

Highlighted
New Member

Re: toggle a buttons visibility on parent select

This did it, thank you!

Helpful resources

Announcements
secondImage

Demo-Extravaganza 2020

Check out these cool Power Apps & vote on your favorite!

secondImage

Community Highlights

Check out whats happening in Power Apps

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (8,405)