This topic is locked

Updating readonly date during add or edit

3/7/2006 11:37:24 AM
ASPRunnerPro General questions
D
dforsha author

I need to use a readonly date field that uses now() whenever a record is added or edited. Using this function as the default value in Edit Format for that field only updates when the record is added, but not when the record is edited. Can I add this in code somehow? Many thanks.
Denis

Sergey Kornilov admin 3/7/2006

Default values work on ADD page only to prevent overwriting existing data on the Edit page.
You can use BeforeEdit Event and the following code:

dict("DateField")=now()


This will upfate field with modification datetime.