cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
leehbi
Frequent Visitor

Update last modified date in a form/db

I have a form connected to a SQL source table with several fields.   I have a field for DateLastModified in this table.

I need to update this field in the db when user edits the form.   On the form I have a button with SubmitForm(ProductForm)

I have the DateLastModified field on my form as an edit record with a date, hour, minute as seperate Items.

I've set the Default for the card : Now() - hence when the user navigates to the record the field updates with the current date/time.    This is saved to the db.  However, if the user has the form open for a number of minutes the data in the database will be out of date.    I need the date to be that at the time the users saves the record.

 

I've tried modifying the OnSelect for my save button : 

 

UpdateContext({DateLastModified_DataCard5: Now()});SubmitForm(ProductForm)

 

But this doesn't have an effect.   Is there a way to do this? 

0 REPLIES 0

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Users online (1,438)