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 / OnSubmit - How to Upda...
Power Apps
Unanswered

OnSubmit - How to Update Text Field = (Previous Value) + 1

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

 

Hello, I want to update the Version_Test each time I save/submit the Form.

 

So I want OnSelect of Text_Edit_IconAccept to update the Version_Test text field as Version_Test = Version_Test + 1

 

How can I do it ? Kindly help me with this.

 

Capture-1.PNG

Categories:
I have the same question (0)
  • Nogueira1306 Profile Picture
    7,390 Super User 2024 Season 1 on at

    Hey! The default of that texp input should be:

    First(Sort(YourDataSource, Version_Test, Descending)).VersionTest + 1

     

    If you need additional help please tag me in your reply and please like my reply.
    If my reply provided you with a solution, pleased mark it as a solution ✔️!

    Best regards,
    Gonçalo Nogueira

    Check my LinkedIn!

    Check my User Group (pt-PT)!

  • eka24 Profile Picture
    20,925 on at

    In the Default of the TextBox:

    If( EditForm1.Mode = FormMode.New,  Last(Datasource).ID + 1,  Parent.Default)

     

    Check out tutorial on Autoincrement with Prefix:

    https://youtu.be/wsaMirkf3Pc

    ------------

    If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

     

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

     

    Hi @Nogueira1306 , Thank you for responding.

     

    I think your way implies that

    Each time when I enter Edit Mode , the Field (Version_Test) is Incremented and OnSumit(Form) it saves !!.

     

     

    But how I want is

    Each time when I enter Edit Mode , the Field (Version_Test) should be same and OnSumit(Form) the Field (Version_Test) should Increment !!

     

    Is it possible this way ?

  • Nogueira1306 Profile Picture
    7,390 Super User 2024 Season 1 on at

    So, when you submit, you add one. Why dont you write on the button you have to submit the form, before the SubmitForm() ?

     

    If you need additional help please tag me in your reply and please like my reply.
    If my reply provided you with a solution, pleased mark it as a solution ✔️!

    Best regards,
    Gonçalo Nogueira

    Check my LinkedIn!

    Check my User Group (pt-PT)!

  • timl Profile Picture
    37,283 Super User 2026 Season 2 on at

    Hi @Anonymous 

    The way to do this is keep the Default property of your text input control as Parent.Default (or ThisItem.Version_Text). This way, each time you enter Edit Mode, the Field (Version_Test) will be same.

    You would then modify the Update property the parent card that contains your text input control to the following:

    ThisItem.Version_Text + 1

    This will increment the Version_Text value of the current record by 1 when the form submits.

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

WarrenBelz 392 Most Valuable Professional

#2
11manish Profile Picture

11manish 136 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 109 Super User 2026 Season 2

Last 30 days Overall leaderboard