*Clean Unwanted Fields

Writing and using plugins for Version 5 and above.
Post Reply
E Wilcock
Posts: 855
Joined: 11 Oct 2014 07:59
Family Historian: V6.1
Location: London

Clean Unwanted Fields

Post by E Wilcock » 07 Feb 2019 10:58

This question is supplementary to the Thread on exporting a DNA Ancestor tree to Ancestry during the course of which I attempted to use this plug in..

As with the topic of writing Queries, I think it best to be honest Mike when I am just not able to understand something in fh and to ask your help. Otherwise I wake up worrying. I like to know what I am doing in fh. And would greatly appreciate a help file for this Plug in.

I have selected this Plug in the Sample Project.
The description says, "Removes fields that typically upset Ancestry, or hold sensitive data, or any chosen by user. It is meant to be used in conjunction with the Export GEDCOM File and Split Tree Helper commands, so will prompt for confirmation if you try to use it on a Gedcom which is open in Project mode."

First question is whether one uses the plug in before or after the Split tree helper?
Second difficulty is that I do not understand the bit in bold. I always use plug ins from the tools menu and have the Project open.

The only command that seems applicable is Run. When I clicked on that I was really nervous as I didnt really know whether Run would delete things or merely open a window with further choices.

But the next thing is to confess that on the pane that opens when one clicks Run, I dont understand the instructions at the top of the pane nor know what a pseudo fact is. Nor do I understand what I see on the list of defaults. I dont understand the excluded list.

I realise today that one can type in a new line, adding an additional data reference at the bottom (which I didnt realise before) but the whole topic of data references can be baffling for the average user and when writing queries one is prompted to select them ready prepared.

May be I need to try adding a data reference to delete from the Sample project? If one wants to delete repeated Tags such as Census or Occupation, does one need to number them creating a data reference for each?

I dont understand the instructions below the table either. I looked for a help file last weekend and gave up. I think I ran it with the defaults on the Gedcom I was preparing for ancestry but may be I didnt dare, since the citation notes got uploaded.

In the TMG Utilty one can simply delete Tags by type - And you surely wrote the equivalent. Your plug in to change any Tag type will also delete. And that Plug in is much easier to understand. Is the only disadvantage that one has to delete each and every tag one by one?

User avatar
Posts: 16190
Joined: 25 May 2010 11:00
Family Historian: V6.2
Location: Torbay, Devon, UK

Re: Clean Unwanted Fields

Post by tatewise » 07 Feb 2019 13:06

You can use this Plugin before, after, or instead of the Split Tree Helper or in various special circumstances.

Like the Split Tree Helper it permanently deletes data from your GEDCOM file.
That data can only be recovered by immediately using Edit > Undo or from Snapshots or Backups.
Hence the dire warnings about using them on master Projects, i.e. in Project mode.

Neither of them are meant to be used on a Project, i.e. full Project structure with Media folders, etc.
Projects are identified by FH saying - Family Historian Project - on the main window top margin.
Projects are also listed in the File > Project Window.

They are meant to be used on stand-alone GEDCOM that are NOT within a Project structure.
Such GEDCOM are identified by FH saying - Family Historian Gedcom - on the main window top margin.
Alternatively, they can be used on a copied Project or a Project such as yours composed purely for the purpose of export.

Data References pane and instructions.
Each line that starts with a data reference enclosed in a pair of % characters identifies what to delete.
All other lines and the text after the second % are just comments to remind you what the references are.
That includes the Excluded Examples which is a way of 'hiding' the data references without deleting them.
Note that none of them start the line with % against the margin, so they are all just comment.

You obtain the data references from within FH by using one of its many Data Reference Assistants.
However, I accept that is a bit awkward, as you can only copy & paste one data reference at a time.
The Plugin was prompted by experts who knew data references well and so knew what they wanted deleted.
You are correct that it probably needs Help & Advice for mere mortals.

The pseudo tag Fact stands in place of all Events and Attributes like a wild-card.
So the data reference %INDI.Fact.AGE% deletes the Age field from EVERY Fact.
Otherwise, you would have to provide a data reference for each and every Fact in your data.

By default, all instances of the data reference are processed, unless specific instances are included.
%INDI.CENS% will delete all Census facts from all Individual records.
%INDI[23].CENS[1]% will delete just the 1st Census fact from Individual with Record Id 23.

The instructions at the bottom provide some useful hints.
To retrieve the original default Data References pane, first delete all its text, then click Apply Data References.
That does not delete any data, but just restores the original settings.
If you want nicely tabulated comments then use Shift & Tab keys together to enter a horizontal tab character.
The Plugin window can be resized by dragging its edges to reveal all its contents.

To remove types of Facts and Records and all Notes it is easier to use the Split Tree Helper.
To remove most other fields that upset Ancestry use the Export Gedcom File Plugin (-) Brief Data mode.
Consequently, it is unlikely that you will need to use Clean Unwanted Fields at all.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry

E Wilcock
Posts: 855
Joined: 11 Oct 2014 07:59
Family Historian: V6.1
Location: London

Re: Clean Unwanted Fields

Post by E Wilcock » 07 Feb 2019 17:07

Mike, you are totally brilliant. Thank you for taking the time. I have read your post and understood everything. You have a gift for explaining complex things in fh so that I can understand them.
I have copied your post and pasted it into my simplified guide to fh.

Post Reply