This topic is locked

Update date field when value of another changes

2/20/2008 6:46:58 PM
ASPRunnerPro General questions
S
semleon author

Sorry guys. Searched all over for this and couldn't find any code to help out.

I'm sure this is simple, but cant seem to get the code right.

(Assuming this would be done on the "After record update" event......)
I have a table called "rcdb_tasks". It has several columns. One of which is "status" and one is "date_closed"
When a records "status" is changed to 'Closed' I want the "date_closed" field to populate with the current date.
Help is most appricated. (BTW, i'm on 5.2 build 388)
Thank you!!

J
Jane 2/21/2008

Hi,
use Before record updated event for this purpose.

Here is a sample:

if dict("status")="Closed" then

dict("date_closed") = Now()

end if

S
semleon author 2/21/2008

Works like a charm. Thank you!