This topic is locked

Update date stamp when record changes

10/9/2005 11:48:40 PM
ASPRunnerPro General questions
G
giffenf author

Forgive my ignorance, but I am new to ASPRunner and haven't been able to figure this out.
I have a table with a field called "Date Changed". I would like to automatically update this field in a record with the current date every time that record is changed. I've experimented a bit but haven't found a way to make it work. I would appreciate all suggestions. Thanks,
FG

Sergey Kornilov admin 10/9/2005

You need to proceed the Formatting tab in ASPRunnerPro and set "Edit as" type of this field to "Hidden". Set default value to Now() to make it updated with current datetime everytime record is modified.

G
giffenf author 10/10/2005

Thanks. I thought I had tried this last night and was unsuccessful, but I tried it again tonight, and it does exactly what I want it to. Thanks! This program makes my clients think I'm a genius. Please don't tell them any differently. <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=reply&id=6284&image=1&table=forumreplies' class='bbc_emoticon' alt=':D' />
FG

A
ashumak 4/3/2006

What about the idea of date stamping one field on. If a comment (text) field is updated, I want the next field automatically tpdated to todays date.
Alan

Sergey Kornilov admin 4/3/2006

Alan,
use Events for this purpose.
Compare old field value with new one and update second field if you have to. Old field value needs to be retrieved from the database. New field value is passed to Event as a parameter.
See sample Events for more info.