I have a from in PowerApps with labels and textboxes. By default textboxes are empty. There is a Button named "Copy last row" when use will click on this button some sample values should be displayed in textboxes.
I checked on internet and the following solution was suggested by PowerApp support.
You need to set the text box' text property to this:
If(HasBeenPressed, "Hello", "GoodBye")
You also need to set the button's onselect property to this:
UpdateContext({HasBeenPressed: true})
or for more fun,
UpdateContext({HasBeenPressed: !HasBeenPressed})
But when I go to the properties of my textbox there is no such property like 'TEXT'.
What do you mean by textbox? a label or a text-input?
Anyways, Label has a text property:

Text-input has a default property

I'm afraid u can't change the text directly. What u can do is create a context variable in the property "OnVisible" of your screen and give the default text you want your labels to have in the first place, or leave the variable in blank since you want them to have no text:
On visible context variable

Then, set the text property of your label to be the value inside the variable

Or the default property of your text-input

Last but not least, set the OnSelect property of your button to change the value of your variable:

This is the result:

Hope this helps!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With