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

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

(0) ShareShare
ReportReport
Posted on by

 

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,923 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
    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
    36,383 Super User 2025 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

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 796 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 327 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard