cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Courtney
Helper V
Helper V

No Button OnSelect

Morning everyone and Happy New Year!

 

I have a button that when its selected (ONSELECT) will bring up an image. What I need is this buttons visibility to be false unless the image (ONSELECT) has happened. I'm sure its something to do with update context but cannot figure it out. Any one have any ideas? 

1 ACCEPTED SOLUTION

Accepted Solutions

Thanks for clarifying @Courtney!

One way to do this is to add the following to the OnSelect property of your button:

UpdateContext({buttonClicked:true})

This sets a variable called buttonClicked to true when the user clicks the button.

You would then set the Visible property of your button to the following:

 

Not(buttonClicked)

 

You can also set the Visible property of your image control to buttonClicked to make the image appear when the user clicks the button.

 

View solution in original post

7 REPLIES 7
timl
Super User
Super User

Hi @Courtney 

I don't quite understand the question so maybe you could clarify?

If you want the visibility of the button to false unless the image (ONSELECT) has happened, then how would the user click the button in the first place so that you can the handle the image (ONSELECT)?

Oh ok. Let me try again. 😅

 

When the user selects the button, I would then like the button to visibility to change to false. 

Thanks for clarifying @Courtney!

One way to do this is to add the following to the OnSelect property of your button:

UpdateContext({buttonClicked:true})

This sets a variable called buttonClicked to true when the user clicks the button.

You would then set the Visible property of your button to the following:

 

Not(buttonClicked)

 

You can also set the Visible property of your image control to buttonClicked to make the image appear when the user clicks the button.

 

Thanks! It works!

Would there be a way to make the button visible again if the image was selected?

Sure, to make the button visible when the user clicks the image, you can add this to the OnSelect property of the image.

 

UpdateContext({buttonClicked:false})

 

 

I was close, I had it set to true! Thank you so much!

You're welcome, glad you got it working!

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Power Platform Call June 2022 768x460.png

Power Platform Community Call

Join us for the next call on June 15, 2022 at 8am PDT.

PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

PA.JPG

New Release Planning Portal (Preview)

Check out our new release planning portal, an interactive way to plan and prepare for upcoming features in Power Platform.

Top Solution Authors
Top Kudoed Authors
Users online (1,721)