<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://community.appian.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Employee Data and saving changes</title><link>https://community.appian.com/discussions/f/data/14246/employee-data-and-saving-changes</link><description>Hi, I am creating an employee application. I have an employee CDT. One of the requirements is to save employee data changes and have a history of the changes. An idea to do this is to save a new employee in the CDT each time a change is made. I don&amp;#39;t</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Employee Data and saving changes</title><link>https://community.appian.com/thread/64360?ContentTypeID=1</link><pubDate>Thu, 31 Jan 2019 06:18:30 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:d7724600-e49b-4eb0-9602-41365516d561</guid><dc:creator>josep</dc:creator><description>Hello eric, &lt;br /&gt;
&lt;br /&gt;
You can do it with a CDT as Evan mentioned. Another Idea If you create a Quick app you will see how they create the Audit history, it is everything handled in Appian as well. &lt;br /&gt;
&lt;br /&gt;
I personally like the following pattern unless you require something more complex than recording the values changes. &lt;br /&gt;
In SQL we have the triggers (on update) which help us to verify when certain value is changed from there you will have the reference of the old.field and new.field values and if something changed you just insert to your audit log. &lt;br /&gt;
&lt;br /&gt;
Depending on how much information you want to have in your audit log you might need to pass it to the employee table, the code to do that is simpler. &lt;br /&gt;
&lt;br /&gt;
Jose&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Employee Data and saving changes</title><link>https://community.appian.com/thread/64342?ContentTypeID=1</link><pubDate>Wed, 30 Jan 2019 15:57:20 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:403aecea-68b7-445b-8c01-156fff06a66a</guid><dc:creator>Evan Rust</dc:creator><description>Hi Eric,&lt;br /&gt;
&lt;br /&gt;
My suggestion would be to have a main Employee CDT, as you suggest, as well as an Audit CDT.  Any update to the employee should overwrite the Employee CDT, so that querying the Employee table will return the most up-to-date employee.  You can also save any change to the employee to the Audit table (and have a foreign key to the employee), so that you can query the Audit table for a single employee (foreign key), and return a history of all action taken on that employee.&lt;br /&gt;
&lt;br /&gt;
Hope this helps.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>