In RM8, citations are re-useable and have a name which is made by concatenating the contents of the citation fields.
So I run this script on my RM version 7 database so that it is ready for importing into RM version 8.
I have taken advantage of this concatenation to get meaningful names by inserting a new field in my own templates as the first one in a citation and then setting the value in the citations to the source name.
This will only work for user templates, not for supplied ones (SourceTable.TemplateID > 10000)
/* update citations for RM8 add in new field - CitItemD for citation name and put in source name - creates good citation name in RM8 */ UPDATE SourceTemplateTable SET (FieldDefs) = cast(Replace(cast(FieldDefs as Text),'<Root><Fields>','<Root><Fields><Field><FieldName>CitItemD</FieldName><DisplayName>Item Name</DisplayName><Type>Text</Type><Hint>Item Name</Hint><LongHint>To distinguish citations</LongHint><CitationField>True</CitationField></Field>') as blob) WHERE TemplateID > 10000; -- or this could be TemplateID = a specific template number to just change one template -- add extra field for name - at the start so it is used for citation name when converting to v8 UPDATE CitationTable SET (Fields) = (SELECT cast(Replace(cast(CitationTable.Fields as Text),'<Root><Fields>','<Root><Fields><Field><Name>CitItemD</Name><Value>' || SourceTable.Name || '</Value></Field>') as blob) FROM SourceTable WHERE SourceTable.SourceID = CitationTable.SourceID ) WHERE EXISTS ( SELECT * FROM SourceTable WHERE (SourceTable.SourceID = CitationTable.SourceID) AND SourceTable.TemplateID > 10000 -- or this could be TemplateID = a specific template number, to just change one template );