cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
sporran
Level: Power Up

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
PowerApps Staff CarlosFigueira
PowerApps Staff

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!

2 REPLIES 2
PowerApps Staff CarlosFigueira
PowerApps Staff

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!

sporran
Level: Power Up

Re: toggle a buttons visibility on parent select

This did it, thank you!

Helpful resources

Announcements
firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

SecondImage

Power Platform Summit North America

Register by September 5 to save $200

Users Online
Currently online: 54 members 4,769 guests
Please welcome our newest community members: