Keep History

  
Hello All Outsystems Gurus! :-)

I need to keep the history of the changes in a table (example, table User). The way I did was create a new table (UserHistory) with the same data as the original, plus one field to store the UserId, a second field to store the username of who changed the record and a third field to store the modification date-time. Then, in the update action, I read the original record (User) by its key, copy field-by-field to the new table (UserHistory) and Add it to the table. Next, I update the original table (User).

This works... But I'd like to know if there's any easier way. If there's not... then I suggest to the Outsystems Programmers to create it... :-)

Thanks for any help

Fernando Dias
Dear Fernando Dias,

The solution you implemented sounds perfectly valid and would probably be our best suggestion.

From our experience, the recording of Entity changes is a fairly uncommon requirement and as such is normally left to specific application implementation like yours.

Your suggestion, however, was logged to be considerated for inclusion on a future version of the product.

Thank you and best regards,


Miguel
Hi Miguel,

Any updates on this ?
Is it already available in the next version ?

Would be great. Especially for Healthcare systems

Thanks, Bart
This is most likely be an unpopular stance but if Outsystems is to support the enterprise namely ERP systems then Historic data is standard and becoming if anything with the value of peoples data ever increasing has gained importance.

The prefered route is temporal support at the database level which involves no programming to implement but record level change is recorded by the database but with out this I have used three database entity level designs to accomplish this:

1. An entity will contain the current version of the record and historic versions controled by record status attribute
2. An entity has a historic entity version. The enity has the current version of a record where as the historic version contains previous versions.
3. An entity has a historic entity but this time the historic entity does not contain all the colomns but generic columns to contain at a attribute level what changed


All the above were a program centric apporach so all the inserts, deletes, updates had to be modified and gets to know where to get data etc so inheritence mechanism was key to replicating the solution over hundreds of tables. That is why Temporal support being a datacentric solution is crazy good!

I have also seen datacentric solutions such as triggers to implement historic data and therefore remove much of the manual coding on the crud functions if you do not have inheritience

And finally the old classic Datawarehousing - Yuk..
Bart,

You're replying to a post that's almost 12 years(!) old! It's common courtesy not to reply to such old threads (it's called "necroing" and generally frowned upon).
Haha sorry i mixed up the date.... lookin at the 15 in the last post.
Combining the fact that yesterday we had a presentation from our local outsystems representative saying this is not supported as far as he knew....

Sorry for that i will ask it somewhere else