web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Configuring Buttons to...
Power Apps
Answered

Configuring Buttons to Insert Default Text in an Input Field in PowerApps

(0) ShareShare
ReportReport
Posted on by 27
Hello,
 
I'm working with a text input field called textEmailMessage2 and need help setting up two buttons. The goal is that, when clicking one of the buttons, it inserts a specific default text into the textEmailMessage2 field; and when clicking the other button, it inserts a different default text, also configured for the same field.
 
Currently, I'm using the following code in the OnSelect event of the button: textEmailMessage2.Text = "default text". I also tried defining a variable, setting the Default property of textEmailMessage2 to "defaultText", and applying the following formula in the OnSelect event of the button: Set(defaultText, "default text"). However, the value is not being assigned to the textEmailMessage2 input field when clicking the button.
 
Does anyone have any suggestions on how to resolve this situation?
Categories:
I have the same question (0)
  • Verified answer
    WarrenBelz Profile Picture
    154,475 Most Valuable Professional on at
    Firstly use a Context Variable
    UpdateContext({varText: "Default Text"});
    Reset(textEmailMessage2)
    then the Default of the Text Box
    varText
    you would set varText to a different value on the other button
     
    Please click Does this answer your question if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it a Like.
    MVP (Business Applications)     Visit my blog Practical Power Apps    Buy me a coffee

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 542 Most Valuable Professional

#2
Haque Profile Picture

Haque 206

#3
Kalathiya Profile Picture

Kalathiya 201 Super User 2026 Season 1

Last 30 days Overall leaderboard