3
votes

I'm trying to do a simple task of changing the text in a text box, on the click of a button in PowerApps.

I have a button "Button1" - and a textbox "TextInput2" on my page.

The buttons OnSelect action is set to: TextInput2.Text = "hello"

Nothing happens when I click the button. The textbox's text remains unchanged.

I also tried UpdateContext({TextInput2:"Hi"}) in the OnSelect action of the button.

Is there a way of doing this in PowerApps, that I may just be missing?

Thank you, Mark

1

1 Answers

4
votes

Finally getting my head around PowerApps.

Set the textbox's text property to:

If(HasBeenPressed, "Hello", "GoodBye")

Set the button's OnSelect event to:

UpdateContext({HasBeenPressed:true})

...and it's working.

I hope this helps others.