This topic is locked

Date / Time Stamp on 4.1 How does this work?

12/10/2006 9:13:08 PM
ASPRunnerPro General questions
S
SDDivine author

Prior to upgrading to 4.1, I had a project with a hidden date/time field that would auto update whenever that record was updated.
I had done that by making the field a HIDDEN field. Now since the newer version doesn't have the hidden field, I can't seem to determine how to update on Edits. It works fine on ADD but not on the Edits.
I have the field set for NOW() in the default.
Any help would be appreciatted. Thanks

Steve Divine

J
Jane 12/11/2006

Steve,
use Before record updated event for this purpose.

Here is a sample code:

Function BeforeEdit(dict, where)

dict("FieldName")=Now()

BeforeEdit = True
End Function



where Fieldname is your actual field name.

Also you can remove this field from the EDIT page on the Choose fields tab in the ASPRunnerPro.

S
SDDivine author 12/11/2006

Steve,

use Before record updated event for this purpose.

Here is a sample code:
where Fieldname is your actual field name.

Also you can remove this field from the EDIT page on the Choose fields tab in the ASPRunnerPro.


THANK YOU VERY MUCH....

I tried removing the field from the EDIT page, but that didn't work for me....however when I inserted the custom code into the Event tab, it worked very well. Thank you! I've just updated to 4.1 and so I'm on a huge learning curve but this new version is fantastic!!!!!
Again, Thank you for that help. Now...on to try the other modifications and see if I can master that.
Steve Divine