I want to display the contents of a field and the date that it was last modified. Displaying the field contents I understand. But, is there a way to display when a field was last modified? I know I can display the last modified date of a tiddler. If there isn't a way, what would be the best way of updating a date field associated with a field?For example. I have a field called Revision. I use the edit-text widget and button widget to update Revision. Is there a way to update a RevDate field that would populate with todays date whenever Revision is modified?
\define setrev() <$action-setfield $tiddler=<<currentTiddler>> rev={{$:/temp/revinput}} revdate=<<now "YYYY0MM0DD0hh:0mm:0ss">> />
<$edit-text tiddler="$:/temp/revinput" tag="input" default="" />
<$button actions=<<setrev>>> set revision </$button>\define showrev(id,label)$label$ {{!!$id$}} {{!!$id$date}} <<getrev id:"$id$" label:"$label$">>\end
\define getrev(id,label)<$edit-text tiddler="$:/temp/$id$" tag="input" default="" /><$button actions=<<setrev id:"$id$">>> Update $label$ </$button>\end
\define setrev(id)<$action-setfield $tiddler=<<currentTiddler>> $id$={{$:/temp/$id$}} $id$date=<<now "YYYY0MM0DD0hh0mm0ss">> />\end
<<showrev id:"step1" label:"Step 1">><<showrev id:"step2" label:"Step 2">><<showrev id:"step3" label:"Step 3">><<showrev id:"step4" label:"Step 4">>From your original post I imagin it is clear now that there is no date field associated with each field in a tiddler only the created and modified dates for the tiddler as a whole.
In some operations it is possible to change the value of a field without touching the modified date. But this is not what you are looking for, it may prove useful in the future. Look for timestamp parameters or in side bar tools where to can switch it off for the whole wiki.
If the suggestions already solve your problem no need to read on.
I believe it would be easy to maintain a last modified date for each field if you desired, but you would need control the methods used to modify the fields so your field timestamp gets updated.
How would I approach this? Maintain a separate qualified system tiddler for each tiddler where the fields in it contain the last modified date for the matching field on that tiddler.
Just ask if taking this path is desirable.
Tony
I believe it would be easy to maintain a last modified date for each field if you desired, but you would need control the methods used to modify the fields so your field timestamp gets updated.