Creating nested tags and moving tags between groups and databases

I make extensive use of nested tags in a genealogy database, for both heirarchical locations (e.g. country > state > county > town) and names (surname > full names).

I can manually create a heirarchy of location tags in advance that I know I’ll need, in tags view, for example, adding tags under a state tag for all the towns I have already identified as relevant to my research.

The problem comes when a new town or county of interest is identified as I’m tagging a new document. It’s a nuisance to have to go into the nested tag list to add New County or New Town under the appropriate state tag, then return to the document to tag it. But if I simply create the new tag in the document’s tag bar, it ends up in the general tag list and I have to periodically comb through the tag list and drag these tags into the location heirarchy.

The same issue arises with names. I can import a list of Surnames and full names into my database from my genealogy software, and have written a script to create a heirarchy of tags with individuals’ names nested under. the surnames (e.g., John Doe and Jane Doe nested under surname Doe). But if I want to tag a document for a newly discovered Bill Doe, again that tag ends up in the general list.

  • Is there any way to create a tag already “nested” on the fly, i.e., from the tag bar?
  • Is there any way to select one or more tags in the tag list and “move to” another tag to nest them, other than dragging (very tedious)? As far as I can tell, the “Data > Move to” command works only with files and groups – the Tags group does not appear in the destination popup for “Move to”.
  • Finally, is there any way to copy a nested tag heirarchy intact to another database? Say I want to start a new genealogy database for someone from the same locations as my family, and don’t want to have to recreate the location tags?

I suspect the answer to all of these questions is to write a script. Has anyone here written a relevant script for any of these tasks, or at least one that would provide a starting place? Have the developers considered adding a “Move to” command for tags or providing a way to create nested tags on the fly? (I realize that the third item on my list may not be of widespread general interest.)

4 Likes

Very interested in answers to these two questions. I’ve tried to do it via smart rules but, as @ kmccracken1951 points out, parent tag groups doesen’t show up as a destination.

  • Is there any way to create a tag already “nested” on the fly, i.e., from the tag bar?

Yes, there is.
Use a forward slash to create a child tag, e.g., US/Nevada/Reno in the Tags bar.

Hashtags in the document can similarly be converted…

  • Is there any way to select one or more tags in the tag list and “move to” another tag to nest them, other than dragging (very tedious)? As far as I can tell, the “Data > Move to” command works only with files and groups – the Tags group does not appear in the destination popup for “Move to”.

No you can’t move tags via the Move to popover.

However, you could open the Go > to Group popover, snap off the popover from the toolbar, leaving it to hover over the windows. You can then search for a tag and drag and drop to it.

  • Finally, is there any way to copy a nested tag heirarchy intact to another database? Say I want to start a new genealogy database for someone from the same locations as my family, and don’t want to have to recreate the location tags?

There are some scripted methods on the forums, but I suggest you create an empty hierarchy you’d want to reuse and export it as a template via File > Export > as Template.
Then in a new database, select the top-level Tags group for the database in the Navigate sidebar and import the template via Data > New from Template > …

This is an imported set of Tags…

image

1 Like

Templates for #tags?? fantastic → THANKS

You’re welcome :slight_smile:

Do you have a specific use-case you’re thinking of?

using the same (complex) hierarchical #tag structure across all my databases.
e. g. continent / country / region or state / city (storing travel stuff e. g. trails, policies, hotels, restaurants, parking places, point-of-interests) → therefore I‘m also really interested in having the GEO location stored into new notes (known issue).
e. g. branche / customer / project / portfolio
e. g. vendor / hardware or software / product
also for food and recipes (meat / beef or pork) (vegetables / vegetarian or vegan)
mobility / e-mobility, public transport, airplane, etc.

Thanks for sharing the examples you were thinking of.