brianbailey
asked on
Indicate date that field changed to a specific value?
I am looking to find out how to indicate the date that a field was saved with a specific value.
I am wanting to do this with a calltrack form I am working on. The form will have two status indicators in a "Status" field: either "Open" or "Closed". The Date Open field is easy, just indicating the date that the form was created. But as far as Date Closed, I need to find a way to populate this field with the date of the last Save when the Status field indicated "Closed".
Any ideas?
I am wanting to do this with a calltrack form I am working on. The form will have two status indicators in a "Status" field: either "Open" or "Closed". The Date Open field is easy, just indicating the date that the form was created. But as far as Date Closed, I need to find a way to populate this field with the date of the last Save when the Status field indicated "Closed".
Any ideas?
correction:
If Status<>"Closed" And source.FieldGetText("Statu s")="Close d then
If Status<>"Closed" And source.FieldGetText("Statu
Declare a global variable say LastStatus as string
Now in Post open record the values like this
If Not Source.IsNewDoc then
LastStatus = Source.Document.Status(0)
End if
In the QuerySave
If LastStatus <> Source.Document.Status(0) then
Source.Document.ClosedAt = Now ' This is the time when close status was saved
End if
~Hemanth
Now in Post open record the values like this
If Not Source.IsNewDoc then
LastStatus = Source.Document.Status(0)
End if
In the QuerySave
If LastStatus <> Source.Document.Status(0) then
Source.Document.ClosedAt = Now ' This is the time when close status was saved
End if
~Hemanth
ASKER
Okay...
I am not as familiar with Lotus Notes as you all are. I'm not exactly sure what you mean by the following:
Form Declarations
Dim
QueryOpen/Save
Post
It is notes version 4.6 (ancient). If you can explain to me what to do as if you were explaining it to someone who doesn't really know coding too well, I would gladly appreciate it.
I am not as familiar with Lotus Notes as you all are. I'm not exactly sure what you mean by the following:
Form Declarations
Dim
QueryOpen/Save
Post
It is notes version 4.6 (ancient). If you can explain to me what to do as if you were explaining it to someone who doesn't really know coding too well, I would gladly appreciate it.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Ok HemanthaKumar,
I set it up just like you said. Created one where status was open and one where status was closed. No matter what status i saved it as, the current date populated in the Date Closed field (which is an improvement, I admit). What am I doing wrong?
I set it up just like you said. Created one where status was open and one where status was closed. No matter what status i saved it as, the current date populated in the Date Closed field (which is an improvement, I admit). What am I doing wrong?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
It works!
You guys rock! I hope I did the points right. Let me know if you didn't get them.
You guys rock! I hope I did the points right. Let me know if you didn't get them.
Dim Status As String
QueryOpen
Status=source.FieldGetText
QuerySave
If Status<>"Closed" And source.GetFieldText("Statu
Call source.FieldSetText("DateC
End If