Saving a history of field value changes to another field

I’ve seen a couple of posts on this, but not quite what I need.

I have 10 date fields on a form. I need to append data to an 11th (a change history) field every time one of those first 10 fields changes. Each change should start on a new line and include the user’s name and date of the change. Here’s an example:

1/1/06 EngStart date changed to 3/2/2006 by Bob

1/3/06 EngDue date changed to 3/5/2006 by Joe

etc.

Any help would be greatly appreciated!

Subject: Saving a history of field value changes to another field

well it’s a bit of coding and would take a while for me to actually write it our for you but basically what you need to do:

create a temp field for each date field to hold the original value, on save check to see if the 2 field’s values match, if they match there was no change, if they are different there was a change. Then you set a history field something like:

tmpDate01 changed to Date01 by username

keep a running history field and concatenate the values together, separating each entry with a new line. hope this helps.

Subject: Saving a history of field value changes to another field

Here is some code I use in a computed text field represented by the name “Thisfield”. If the concatenated value of DateFieldOne and FieldTwo is different than the value stored in “ThisField” then the new value is appended. (I have set a max of 30 values to be stored). This should help you write your code for your histories.

newItem := @Text(@Date(DateFieldOne)) + " " + FieldTwo ;

ecount := @Elements(ThisField);

@Unique(@If(@IsDocBeingSaved & ThisField != newitem; @If(ecount=0 & ThisField != newitem; newItem; @If(ecount>30 & ThisField != newitem;

@Subset(ThisField;-30) & ThisField != newitem : newItem ; ThisField : newItem)); ThisField))