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 / Set property of anothe...
Power Apps
Answered

Set property of another field when OnSubmit is performed

(0) ShareShare
ReportReport
Posted on by 138

I want to change the "Text" property of a Textfield when i submit my form. How can i assign a value to a Textfield out of the OnSubmit property?

In C# i would just assign it like this:

Class.Text = "XYZ"

 

Thanks!

Categories:
  • Verified answer
    RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @FrostedFlake 

    PowerApps uses values by reference not by assignment.  

    I am not sure what the OnSubmit property is that you refer to.  I am assuming you mean the OnSuccess of your form.

    If so, you can set a variable in your OnSuccess action.  Either a screen variable - UpdateContext({someVar:"SomeVal"}) or a global app variable - Set(someVar, "SameVal")

     

    You can then set the Text property of your control (presumably a label) to someVar

     

    I hope this is helpful for you.

  • Verified answer
    GarethPrisk Profile Picture
    2,828 on at

    To expand on @RandyHayes' response, you may be looking to change/set the Update property of the Data Card within the form.

    https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/working-with-cards#information-flowing-out

    In a nutshell:

    • Forms are built-in controls which allow to quickly/easily setup a data source and inputs (fields)
    • For each field, power apps inserts a Data Card
      • The Data Card is locked by default
      • It has a few controls (based on data type), which are included with the Data Card
      • The Data Card itself has a few properties; including the Update property
        • This is what is actually sent to the DB when you SubmitForm

    You can unlock the Data Card and update the individual controls, and the properties of the Data Card itself. In your example, you'd be looking to

    1. Use @RandyHayes suggestion of a local variable
    2. Set the Default field of the control, with that variable (this is what the Update property of the data card references)
    3. OR set the Update property equal to the variable



    https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/working-with-forms

     

  • Verified answer
    FrostedFlake Profile Picture
    138 on at

    @GarethPrisk @RandyHayes Thank you guys!

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 395 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 328

#3
WarrenBelz Profile Picture

WarrenBelz 260 Most Valuable Professional

Last 30 days Overall leaderboard