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 / Add to text field and ...
Power Apps
Answered

Add to text field and submit a form when a button is pressed

(0) ShareShare
ReportReport
Posted on by

I am sure this is a very stupid question but I am failing to figure it out.

 

What is the best way to insert into a text field and submit a form when a button is pressed? 

 

I using a SharePoint list as the data source.

 

This is what I thought would be the correct way to do it, however, it is not working:

UpdateContext({Status_DataCard1:"Pending"});SubmitForm(EditFormSave)

Categories:
I have the same question (0)
  • Verified answer
    PowerAddict Profile Picture
    7,316 Most Valuable Professional on at
    Set the text in a variable and keep the default property of the label to this variable.

    Something like:

    UpdateContext({textVar:"Pending"});SubmitForm(EditFormSave)

    Let me know if this helps.

    ---
    If you like this reply, please give kudos. And if this solves your problem, please accept this reply as the solution.

    Thanks!
    Hardit Bhatia
    The Power Addict
    https://thepoweraddict.com
  • PowerAddict Profile Picture
    7,316 Most Valuable Professional on at
    Also if Pending is a value of an Option Set you will have to reference it a bit differently.

    ---
    If you like this reply, please give kudos. And if this solves your problem, please accept this reply as the solution.

    Thanks!
    Hardit Bhatia
    The Power Addict
    https://thepoweraddict.com
  • eka24 Profile Picture
    20,923 on at
    Set a variable on the SubmitButton : Set(MyText,"Pending");
    SubmitForm(EditFormSave)

    Then in the default of the textbox put the variable name: MyText
  • Community Power Platform Member Profile Picture
    on at

    Your solution did work for adding text when a button is pressed @PowerAddict . However, now I realized that I will need a way for the text to disappear when a new form is created. 

     

    I am trying to create a save and submit buttons for my app my using a column named "Status". My plan was to insert "Pending" when the save button is pressed and "submitted" when the submit button is pressed.

  • PowerAddict Profile Picture
    7,316 Most Valuable Professional on at
    If you simply want your text to disappear when you are creating a new record, set the Default property of the label to:
    If(FormName.Mode = FormMode.Edit, "Pending", Parent.Default)

    The second part of your question: IS the only remaining part where you want to set the value to Submitted when the Submit button is pressed? Is this also in the same label that we have been referencing here?

    ---
    If you like this reply, please give kudos. And if this solves your problem, please accept this reply as the solution.

    Thanks!
    Hardit Bhatia
    https://thepoweraddict.com
  • Community Power Platform Member Profile Picture
    on at

    I solved the problem of the text not disappearing by hiding that data card on the edit screen, since the user will not need to see it. Thank you for your help! @PowerAddict 

  • PowerAddict Profile Picture
    7,316 Most Valuable Professional on at
    Glad I could help! Good luck with the rest of the app! Feel free to reach out in case of any questions!

    Thanks!
    Hardit Bhatia
    https://thepoweraddict.com

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
WarrenBelz Profile Picture

WarrenBelz 739 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard