We have a use case (on Appian), where a user wants to see both the older as well as new updates made to any field of a Record, and to pull out an excel version of the same from Appian.
For example, a record with Car's mileage initially marked as 10000, and then updated to 12000, the user wants to pull an excel that shows two rows of thus record with both the mileage values, also with a timestamp (Created or updated date)
Discussion posts and replies are publicly visible
I recommend a history CDT. Everytime a value is changed at the same time you store the change there.I recommend the following structure of the history CDT.
I typically use Richard's solution when implementing "Change Log" type of functionality. A big helper to this is the CDT Diff Utilities plugin which can compare 2 CDTs and give you a listing of fields which have changed, their old and new values, to help you more easily log the change, vs having to code field by field.
Otherwise another method would be to have a full log table, which is a essentially a copy of your primary table. In this log table, the PK of the parent table is not a PK (it can be entered multiple times), and you have a new PK field specific to the log row. At any rate, when you are persisting your primary CDT, copy the row into the log table CDT and write that as well, which will create one entry in the log per save of the main data.
There are a few additional considerations, but I'll include those in the overall approach I am thinking of taking for my current project: