Tracked Value Form with Change Log

This page uses a Hashtag Form to create, update, or delete a Tracked Value.   Form Actions are used to log all changes, recording both the old and new values.  
Tracked Value:



Processed this Hashtag Markup:
<# start form for tracked_values <#[url.edit]#>;
	set form.class to "form-horizontal";
	when creating 
		create new record for "tracked_values_changelog";
			set tracked_value_id to "<# form.id #>";
			set type to "Create";
			set name to "Tracked";
			set old to "";
			set new to "<# form.tracked #>";
	when updating and ("<# form.tracked #>"!="<# tracked #>") 
		create new record for "tracked_values_changelog";
			set tracked_value_id to "<# form.id #>";
			set type to "Update";
			set name to "Tracked";
			set old to "<# tracked #>";
			set new to "<# form.tracked #>";
	when deleting 
		create new record for "tracked_values_changelog";
			set tracked_value_id to "<# form.id #>";
			set type to "Delete";
			set name to "Tracked";
			set old to "<# tracked #>";
			set new to "";
	when done redirect to "/changelog/list?index=<# form.id #>";
#>

Tracked Value:<br>
<input type="text" <# Tracked #>><br>
<input type="button" <# Create button #>>
<input type="button" <# Update button #>>
<input type="button" <# Delete button #>>

<# end form #>


The Track Changes Mini-App uses the Hashtag Markup Language to log every change of Tracked Values.

The Tracked Values, as well as the Change Logs, are stored in an SQL Database.   Methods are provided to create, update, and delete any Tracked Value.   The Change Log can be filtered by Value ID.