cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
neill_long
Level: Powered On

UpdateContext and Visibility

I have a button on my gallery that when you click it, a label appears.  The button has on it's onselect:

 

UpdateContext({Click: ThisItem.Clue})

 

The label has on it's text property:

 

Click

 

What i would like, is when the button is pressed, the button disappears and only displays the clue.

 

I thought if i put !Click on the Visible property of the button would work but the button disappears even though it hadn't been pressed yet.

 

Can anyone help?

 

thanks

 

1 ACCEPTED SOLUTION

Accepted Solutions
PowerApps Staff Mr-Dang-MSFT
PowerApps Staff

Re: UpdateContext and Visibility

Hi @neill_long,

You're very close. If I understand correctly, you want the label to appear upon the click of a button. There's a few solutions you can use here. 

 

I like variables, but this looks like a job for a transparent checkbox. You have two states which affect visibility of controls, and you may want a different state for each row in the gallery. The checkbox is ideal in this situation because it keeps track of two states independently for each row.

 

  1. Insert a checkbox into the gallery.
  2. Change its CheckboxSize to 0 so no checkbox appears.
  3. Erase its default text.
  4. Resize it so it covers the gallery's template size.
  5. Change the Visible property of the label to Checkbox.Value so it appears when the checkbox is checked.
  6. Change the Label's text property to ThisItem.Clue.

Let me know if I understood your scenario correctly.

 

Mr. Dang

2 REPLIES 2
PowerApps Staff Mr-Dang-MSFT
PowerApps Staff

Re: UpdateContext and Visibility

Hi @neill_long,

You're very close. If I understand correctly, you want the label to appear upon the click of a button. There's a few solutions you can use here. 

 

I like variables, but this looks like a job for a transparent checkbox. You have two states which affect visibility of controls, and you may want a different state for each row in the gallery. The checkbox is ideal in this situation because it keeps track of two states independently for each row.

 

  1. Insert a checkbox into the gallery.
  2. Change its CheckboxSize to 0 so no checkbox appears.
  3. Erase its default text.
  4. Resize it so it covers the gallery's template size.
  5. Change the Visible property of the label to Checkbox.Value so it appears when the checkbox is checked.
  6. Change the Label's text property to ThisItem.Clue.

Let me know if I understood your scenario correctly.

 

Mr. Dang

neill_long
Level: Powered On

Re: UpdateContext and Visibility

@Mr-Dang-MSFT

 

This worked beautifully, thanks very much for your help.

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

Top Kudoed Authors
Users Online
Currently online: 157 members 4,255 guests
Please welcome our newest community members: