Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Indicate date that field changed to a specific value?

Status
Not open for further replies.

BrianBailey

Technical User
Mar 21, 2003
10
US
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?
 
Formula :
When the document is saved, have the closed date field check if it is empty or not. If so, check what the status is. If "Closed", get the date, else keep the field value.
@if(@isdocbeingsaved;
@if(field="";
@if(status=&quot;Closed&quot;;@now;<fieldname>);
<fieldname>);
<fieldname>)

or you can use the QuerySave event with almost the same formula code :

FIELD <fieldname> := @if(field=&quot;&quot;;
@if(status=&quot;Closed&quot;;@now;<fieldname>);
<fieldname>);
<fieldname>)

or with LotusScript code :

if source.fieldgettext(<statusfield>) = &quot;Closed&quot; then
if source.fieldgettext(<closeddatefield>) = &quot;&quot; then
source.fieldsettext(<closeddatefield>,NOW)
end if
end if

Finally, you can use the Save button to do the same check.

Pascal.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top