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

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / How can I capture the ...
Power Apps
Unanswered

How can I capture the "Last update Date" on Form submission

(0) ShareShare
ReportReport
Posted on by 18
Hello Community
 I have a datetime field in my Sql database.
 
Before the SubmitForm command, I want to update the date and time  ("Last Updated on ") to the value as at Now(). Can anybody help me based on the above/attached file on the codes. I thank you.
Categories:
I have the same question (0)
  • timl Profile Picture
    36,319 Super User 2025 Season 2 on at
    Need help Please
    Hi  JC-04111302-0 
     
    If you set the Default property of the card 'Last Updated On_DataCard3' to Now(), that should hopefully work.
     
  • JC-04111302-0 Profile Picture
    18 on at
    Need help Please
    Hi Timl
    Thank you. I did what you suggest before coming to the community. It does not answer to the problem. I explain. The default is set to Now() and say it displays 7:40 am on the screen. I leave the application open and come back after 10 minutes and submit the form. The Last updated field on the screen is still 7:40,  and this is what get updated, whereas the update field should have been 7:50 am, the actual time.. This is why I want to refresh the time before the SubmitForm is executed. Any help?
  • timl Profile Picture
    36,319 Super User 2025 Season 2 on at
    How can I capture the "Last update Date" on Form submission
    Hi  JC-04111302-0 
     
    You could do this with a variable. In the OnVisible property of your screen, you can assign Now() to a variable like so.
     
    Set(varCurrentTime, Now())
    You would then set the Default property of the 'Last Updated On_DataCard3' card to varCurrentTime.
     
    Before you call SubmitForm, you can update the variable and that should then save the actual time.
     
    ​Set(varCurrentTime, Now());
    SubmitForm(YourForm)
    
     
  • Verified answer
    ronaldwalcott Profile Picture
    3,847 Super User 2025 Season 2 on at
    Need help Please
    If you want the actual time before the submit you could set the update property of the datacard for the date to a context variable like (initialize the value elsewhere)
    UpdatedDate
     
    and then in the OnSelect for the Submit
     
    UpdateContext({UpdatedDate: Now()}); 
     
    This should record the actual data time that the record was updated

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

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 322 Super User 2025 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 209 Super User 2025 Season 2

Last 30 days Overall leaderboard