Find all sources attached to a Source Template?

Is there a way to select/search for all sources that are of a specific source template (Source Type)?

Is there a way to change it to a different source template?

I’m trying to clean up my sources and have lots of junk accumulating from imports from TMG, Ancestry and FamilySearch.

Just being able to search for them would be a big step forward.

1 Like

The answer to both questions is no.

1 Like

TPTB - This would be a very good addition.

I was about to post a forum question on this very topic when I saw that it had already been answered. It was great to be able to search the forum so easily for similar issues, but not so great to have confirmation that we cannot trace a particular source type!

it would be a great feature for RM to add. Presently it’s possible to trace from source to citation to event, and it would be great to have that “missing first link” stepping us right back to the template that was used that started it all!

And in looking at some of my citations I too would like to change one source template to another as @BevSmallwood was asking. Finding that was not possible, I decided to alter one of my master sources, moving the “Credit line” field on the “Military Records (Images)” source template from the master source section to the citation details section. The field moved as expected to the citation details section, however the text that was entered into that field did not transfer across with the move. It came across blank. It wasn’t too much of an issue as I had to alter the text in the field anyway (and I’d taken a backup of the database beforehand just in case), but just thought I’d let people know in case they are thinking of a similar adjustment to their templates.

1 Like

Behind the scenes, all the variables in RM’s source templates are stored in a column called Fields in RM’s database. The SourceTable has a column called Fields and the CitationTable has a column called Fields because any source template variable can be stored either as a part of the source or as a part of the citation. When you changed your source template to move the “Credit line” variable from Source to Details, the data was still there in the Fields column of the SourceTable but RM could not access it because your variable now pointed to the CitationTable.

It’s a subtle problem that doesn’t have an easy software fix. I have written SQLite scripts before to move Fields data between the SourceTable and CitationTable, but such scripts are much more difficult than typical SQLite scripts. That’s because the Fields data is stored as XML strings and SQLite has no easy way to parse XML. The template variables can’t be actual relational database columns because the database designers have no idea what your variables are going to be and you can invent new ones at any time.

Moving data between Source and Citation in either direction, even without using SQLite can leave detritus behind in the field from which you moved a variable. IN RM7, such detritus caused no problems whatsoever. The left behind data simply wasn’t used. But I’m discovering that such detritus in the Fields column in my RM7 database is causing otherwise identical citations not to merge automatically when the data is imported from RM7 to RM8. Therefore, I am now having to clean up such data in RM7 in preparation for a final import into RM8 someday. The same issue an cause otherwise identical sources not to merge automatically when such RM7 data is imported into RM8.

2 Likes

Hi Jerry, thanks once again for taking time out to provide an explanation on the issues surrounding moving fields in custom designed templates between the source and citation blocks. I thought I was getting pretty smart in doing that, but perhaps not!

Maybe it’s time I started learning SQLite (I saw on another post that TomH provided a link) but I just love all the family history hunting and can’t believe what I find each day, so learning computer code doesn’t hold the same appeal right now.

I’ll jump on to your other post about having success with matching your endnotes (well done!!) as I saw you mentioned a caveat about issues with moving fields.

Thanks once again for all the work that you do in guiding and supporting the RM users on this forum – it’s much appreciated!

I agree this would be a very useful feature. When I used to do imports from Ancestry, it made many duplicates of Source Templates. RM9 takes us a step closer. You can delete a Source Template, and if there are records with it, a message pops up:
“Are you sure? There are sources using this source. If you delete this source type, RootsMagic will remove all sources of this type from your database. Are you sure you want to delete it?” Then you can select [No].
I was able to remove 21 of 23 duplicates this way.

There is, outside of RootsMagic, using outboard tools and a process that requires technical skill and a good understanding of the underlying structures of source templates. Thanks to @RichardOtter, there is this: