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

Notifications

Announcements

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
    153,467 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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
Kalathiya Profile Picture

Kalathiya 408

#2
WarrenBelz Profile Picture

WarrenBelz 382 Most Valuable Professional

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 328 Super User 2025 Season 2

Last 30 days Overall leaderboard