Changes to Source Template impact to previously entered data

My question is basically is when you have a source based on a template and you make updates/corrections to the template – they will flow to source and citations – however – what happens to the data previously entered? Obviously if you add a new field it would be null/blank for all.

Assuming if you delete a field all that data associated with the field would be lost?
What happens if you simply correct name of field?
What if you move field to citations (such as Long Place Name shown below) ?
What if you move field from citations to Source (such as ref#)?

It’s lost from view but remains in the XML data in the Fields column in the SourceTable or CitationTable.

If you change [oldname] to [newname], previous sources and citations will output “[newname]” literally in the sentence because their [oldname] XML tags did not change and they do not contain the [newname] tags at all.

Nothing moves but the sentence will now output “[Place]” instead of the value because it cannot find the XML [Place] tags in the Citation data.

The opposite direction has the same result. Sentence outputs “[Ref#]” because it cannot find [Ref#] tags in the pre-existing Source data.

As for the cases above, the added [newfield] if included in the sentence will be output as “[newfield]” because the template cannot find that field name in the XML data. You have to ‘touch’ edit/save the Source or Citation to cause the new or relocated or renamed tags to be added to the data, even if left empty.

so bottom-line basically the XML data bob is not modified but due to changes (those fields) may become unavailable unless you revert changes to original state for course and citations? unless a change was update between – although this might be a little more complicated depending how / if citations were copied or reused.

reverting the changed field name or location (source or citation) or even creating anew the same oldfield in the same oldlocation will allow a sentence template containing [oldfield] to output the old data.

New sources or new citations created after [oldfield] was removed from the template won’t have it in their XML data so any restoration of [oldfield] in the sentence template will result in “[oldfield]” in the sentnce outputted for that citation.

1 Like

If you are technically inclined, have a look at this python-sqlite utility developed by @RichardOtter:

I think it could do most, if not all, of what you want to accomplish and could be a model for what has been a requested enhancement since the early days of Source Templates (2009-10).

1 Like

well I suspect the next release around the time RootsTech we will see some enhancement (we are (past) due for some).

1 Like