* Combine two templates?
-
APerson
- Diamond
- Posts: 60
- Joined: 19 Jan 2022 03:23
- Family Historian: V7
- Location: New Jersey, USA
- Contact:
Combine two templates?
I've been using FH a great deal over the past week and am sold on it! However, I've come across a problem that I can't solve concerning templates. Specifically, I imported all of my data over from RM and then used the plugin to add them to FH and that seemed to work well. In addition, I made some slight changes to a few things in the new templates (essentially, I added "prompts" (in RM, "hints") and descriptions that were in the original templates to the new ones in FH as those did not come over during the conversation process. I also had to change the Footnote formats because FH handles them a bit differently than RM (again, not a big deal).
What I've come across is that I now have two templates for the same thing with the data still attached to the old templates but I want them attached to the new ones. (There are only have three templates, total, that I need to convert from RM to FH). Here's a screen capture of the old template imported into FH:
In order to ensure that I kept the old version separate from the new one, I created a new collection (called Simple Citations) and put the new templates in there. Here's a copy of the new template. Again, all of the data fields remain exactly the same - I merely added new "prompts" (hints) and descriptions (I believe RM calls these "Long Hints); again, all of the fields and field names remain the same:
I want to transfer the data from the old template (ID #10010) into the new template (ID #10016). I'm currently at a loss as to what to do next.
Thanks for your help!
What I've come across is that I now have two templates for the same thing with the data still attached to the old templates but I want them attached to the new ones. (There are only have three templates, total, that I need to convert from RM to FH). Here's a screen capture of the old template imported into FH:
In order to ensure that I kept the old version separate from the new one, I created a new collection (called Simple Citations) and put the new templates in there. Here's a copy of the new template. Again, all of the data fields remain exactly the same - I merely added new "prompts" (hints) and descriptions (I believe RM calls these "Long Hints); again, all of the fields and field names remain the same:
I want to transfer the data from the old template (ID #10010) into the new template (ID #10016). I'm currently at a loss as to what to do next.
Thanks for your help!
- Mark1834
- Megastar
- Posts: 2145
- Joined: 27 Oct 2017 19:33
- Family Historian: V7
- Location: South Cheshire, UK
Re: Combine two templates?
I can't think of an easy way of changing the source template directly from the user interface, but it should be possible if you are CERTAIN that everything in the old template has a matching definition in the new one. Expand the two template listings in the Records Window for a detailed comparison.
The quick and dirty (but not recommended) way is to do a global search and replace in the GEDCOM file to change the template link. The more elegant (and recommended) route is a very simple plugin script (only a handful of lines) that we could post here for you to copy. Essentially it will just convert all links to 10010 into links to 10016, but without any error checking for mis-matched definitions.
Let's see if someone more experienced with templated sources will suggest a better route, an existing plugin that does the same job or gotchas that I have not thought of...
The quick and dirty (but not recommended) way is to do a global search and replace in the GEDCOM file to change the template link. The more elegant (and recommended) route is a very simple plugin script (only a handful of lines) that we could post here for you to copy. Essentially it will just convert all links to 10010 into links to 10016, but without any error checking for mis-matched definitions.
Let's see if someone more experienced with templated sources will suggest a better route, an existing plugin that does the same job or gotchas that I have not thought of...
Mark Draper
Re: Combine two templates?
Maybe the attached plugin (Change Source Template) that I use to change one template to another (or even change field in existing templates) might help? I was planning to add it to the store, but haven't found time to do it. The text file does a bit of explaining on the usage.
I have also attached a few other plugins that may be of use:
- Update Source Titles - Can be used to update the source titles after changes that modify the title.
- Rename Selected Source Media - I use the same name for source images attached to a source as the source title (works only if 1 image attached). If you use the same convention, this plugin may come in handy.
I have also attached a few other plugins that may be of use:
- Update Source Titles - Can be used to update the source titles after changes that modify the title.
- Rename Selected Source Media - I use the same name for source images attached to a source as the source title (works only if 1 image attached). If you use the same convention, this plugin may come in handy.
- Attachments
-
Rename Selected Source Media.fh_lua- (4.42 KiB) Downloaded 49 times
-
Change Source Template.fh_lua- (8.99 KiB) Downloaded 59 times
Re: Combine two templates?
There is a maximum number of attachments, here are the other two.
- Attachments
-
Update Source Titles.fh_lua- (636 Bytes) Downloaded 50 times
-
- FH change source template.txt
- (1.9 KiB) Downloaded 53 times
- tatewise
- Megastar
- Posts: 27074
- Joined: 25 May 2010 11:00
- Family Historian: V7
- Location: Torbay, Devon, UK
- Contact:
Re: Combine two templates?
Alternatively, you can achieve that by using Edit > Merge/Compare Records... especially as you have only made minor changes.
Make sure you have a Backup or a Snapshot you can rely on.
If you need to keep a copy of the original template then use Tools > Source Template Definitions... and Clone it.
In the Records Window on the Source Templates tab, select the template currently used by your Source records.
Use Edit > Merge/Compare Records... and select the new replacement template and click OK.
In the Merge Records dialogue carefully expand and compare every item.
In the Merge Into pane select an item that needs replacing and click Discard button lower left.
In the Merge From pane select the replacement item and click Retain button lower left.
Repeat until all the required field items are being kept or added, then click Merge.
That should update the existing template with all the new fields.
Now use Tools > Source Template Definitions... and select the modified template that is identified by mod in the Used column, and apply the Compare/Sync with Source Template Record... process.
If it does not look satisfactory, use the Edit > Undo ... command repeatedly until the original status quo is restored, but before closing FH, otherwise you will need to use Backups/Snapshots.
If you had asked before you started then we could have advised that you clone the original template for posterity and then applied the corrections to the original. That would have avoided this merging process.
Make sure you have a Backup or a Snapshot you can rely on.
If you need to keep a copy of the original template then use Tools > Source Template Definitions... and Clone it.
In the Records Window on the Source Templates tab, select the template currently used by your Source records.
Use Edit > Merge/Compare Records... and select the new replacement template and click OK.
In the Merge Records dialogue carefully expand and compare every item.
In the Merge Into pane select an item that needs replacing and click Discard button lower left.
In the Merge From pane select the replacement item and click Retain button lower left.
Repeat until all the required field items are being kept or added, then click Merge.
That should update the existing template with all the new fields.
Now use Tools > Source Template Definitions... and select the modified template that is identified by mod in the Used column, and apply the Compare/Sync with Source Template Record... process.
If it does not look satisfactory, use the Edit > Undo ... command repeatedly until the original status quo is restored, but before closing FH, otherwise you will need to use Backups/Snapshots.
If you had asked before you started then we could have advised that you clone the original template for posterity and then applied the corrections to the original. That would have avoided this merging process.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
-
APerson
- Diamond
- Posts: 60
- Joined: 19 Jan 2022 03:23
- Family Historian: V7
- Location: New Jersey, USA
- Contact:
Re: Combine two templates?
Thank you everyone! This was very helpful. Mike's solution was the one that I was able to get to work. Although it is not for the faint of heart, I took my time and made a lot of backups first. The only thing I couldn't find (at first) was the location of the "Records Window" (View > Other Records Lists > Source Templates) but after that, I was successful. I must have missed something when I first brought in my RM data but that was problem due to my own lack of familiarity with FH. I would have never found the solution without your help.
Anyway, I've been SLOWLY taking my time and am testing just one of my templates (again, there are only three for everything) at a time - that's how I initially discovered the problem (facts were linked to the imported RM templates and not the ones I had altered to use with FH).
Once again, thanks for your great help! Again, I'm taking things SLOWLY but have already found FH to be SIGNIFICANTLY more efficient and faster than RM - CP has done an amazing job!
FYI, my site, Simple Citations (listed below) that describes my templates is currently down as I'm in the process of changing hosting companies - hopefully, it'll be back up soon (today). Once I'm content with the subtle changes I've had to make from the ones I originally created for RM (nothing substantive at all), I'll share them. So far, things seem to be working very well and the ability of FH to use templates for sources was a major factor in convincing me to try it in the first place. As I mentioned, FH also me to enter data a LOT faster too. I spent the past week converting one very large document someone had sent me a very long time ago that I had originally entered using an OLD program (I've used various software applications over the past several decades beginning with one of the first versions of PAF - written for DOS. When RM made some great strides, quite some time again that allowed me to document my sources (I'm MILITANT about that), I became a fan. However, over the years, they didn't make many changes that were needed and then RM8 came out, which is a step backwards. I think FH has managed to significantly one-up RM because it focuses on data, and not making the UI "look pretty" at the expense of many other very important components. So far, I'm a very happy camper! Thanks!
Anyway, I've been SLOWLY taking my time and am testing just one of my templates (again, there are only three for everything) at a time - that's how I initially discovered the problem (facts were linked to the imported RM templates and not the ones I had altered to use with FH).
Once again, thanks for your great help! Again, I'm taking things SLOWLY but have already found FH to be SIGNIFICANTLY more efficient and faster than RM - CP has done an amazing job!
FYI, my site, Simple Citations (listed below) that describes my templates is currently down as I'm in the process of changing hosting companies - hopefully, it'll be back up soon (today). Once I'm content with the subtle changes I've had to make from the ones I originally created for RM (nothing substantive at all), I'll share them. So far, things seem to be working very well and the ability of FH to use templates for sources was a major factor in convincing me to try it in the first place. As I mentioned, FH also me to enter data a LOT faster too. I spent the past week converting one very large document someone had sent me a very long time ago that I had originally entered using an OLD program (I've used various software applications over the past several decades beginning with one of the first versions of PAF - written for DOS. When RM made some great strides, quite some time again that allowed me to document my sources (I'm MILITANT about that), I became a fan. However, over the years, they didn't make many changes that were needed and then RM8 came out, which is a step backwards. I think FH has managed to significantly one-up RM because it focuses on data, and not making the UI "look pretty" at the expense of many other very important components. So far, I'm a very happy camper! Thanks!
- tatewise
- Megastar
- Posts: 27074
- Joined: 25 May 2010 11:00
- Family Historian: V7
- Location: Torbay, Devon, UK
- Contact:
Re: Combine two templates?
Perhaps one piece of advice to review is the FHUG KB Key Features for Newcomers.
Among other things under Records, Fields and Multimedia it explains how to reveal all the Records Window tabs.
Quickly go through the other topics as they cover things that new FH users have often mentioned they overlooked.
Among other things under Records, Fields and Multimedia it explains how to reveal all the Records Window tabs.
Quickly go through the other topics as they cover things that new FH users have often mentioned they overlooked.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry