Delete Data For Living People

Introduction

It is sometimes necessary to delete the data for living people from your database, before publishing it to a wider audience such as on a website.

The techniques outlined here combine many Family Historian features including Record Flags, Named Lists, Custom Queries, Export GEDCOM File, Split Tree Helper, Merge/Compare File, and the PSPad Editor. Together they allow various amounts of data to be excluded depending on your needs.

Most of these techniques assume your database creates a separate Source Record linked to each Citation, rather than generic Source Records linked to many Citations, as explained in the Source Records glossary.

Before embarking on this process it would be worth experimenting with a program such as Res Privata that may remove sufficient data for your purposes.

Also see Exporting a Family Tree with/without Media especially under Export to Website Without Sensitive Data.

Individual Living & Private Flags

The first step is to set the Living Flag on all Individual Records for people that are alive.
You can similarly set the Private Flag on Individual Records you want to exclude entirely.

The Downloads and Links ~ Living People Identification section offers Queries and other techniques for managing living people data.
In particular the Flag Living Query helps with setting the Living Flag on appropriate Individual Records.

In the Individual Records Window, it is useful to add a Living Flag column that displays 'Y' for each flagged person:

  • Open the Individuals Records Window and use the menu bar option Lists > Configure Record Window Columns.
  • Scroll towards the bottom of the Item list, select Living Flag, and click the > button in the middle to add it to the right-hand Column.
  • Use the up/down arrows to position the Living column, and finally click OK.

To set the flag manually, right-click on an Individual Record name and use the menu bar option Set Flag > Living.

Then when using Internet > Create a Website or File > Import/Export > Export > GEDCOM File you can use Living/Private options and Add/Remove using Query selections to restrict living and private data.

If the methods above do not achieve what you want, then the following processes can be customised to your needs.

Create Public Project Database

Regardless of which data will eventually be deleted, it is recommended that a Public Project is created to hold the resulting database.

If any Multimedia Files are to be deleted, then a Public Project database is essential, because you will not want to delete Multimedia Files from the master database.

  • Open the original master project database.
  • Use File > Project Window > More Tasks > Copy Project and click OK to close the current project.
  • Set the Name of Copy to Public and, if desired, alter the Location for Copy.
  • Set Items to Copy (click Help for advice), click Copy, and finally OK.

If none of the Multimedia Files are to be retained, then delete the Media folder from within the \Public\Public.fh_data folder.

Delete Facts For Living People

The process described here, creates two copies of your GEDCOM file, which are then merged into one.
One GEDCOM has no Facts for every Individual Record, the other GEDCOM has all the Facts but no Living Individual Records.
These two files are Merged to produce a GEDCOM without any Facts for every Living Individual Record.

The process throws up some decision points around Multimedia Records/Media Files, and Family Facts for Living Individuals.

Create GEDCOM Without Facts

This step creates a GEDCOM file with all the Individual Records and Family Records, but without Facts, and without Source, Multimedia, Repository, Note, Submitter, and Submission Records.

  • Open the original master project database.
  • Use File > Import/Export > Export > GEDCOM File > Add All button, tick every Exclude … records option, and click OK.
  • Set Save in: to the \Public\Public.fh_data project folder, set File name: to NoFacts.ged, and click Save.
  • Click Yes to Do you wish to view the exported file?.
  • On the NoFacts.ged use File > Split Tree Helper, select Delete all facts listed below, click Edit List button, click >> button to select every Fact, click the OK and Delete buttons.
  • Close this Family Historian window (you can skip the backup).

This step can be adjusted in the Split Tree Helper to delete whichever combination of Facts you prefer.

Split Tree Helper for GEDCOM Without Facts

Create GEDCOM Without Living Individuals

This step creates a GEDCOM file with all the Facts and Records required, but without any Individual Records for Living people.

  • Open the original master project database.
  • Use File > Import/Export > Export > GEDCOM File > Add All button.
  • Untick Exclude all records which are not linked to the selected Individual records. (Otherwise all Note, Multimedia, Source, Repository, and other records not directly linked to Individual Records will get excluded).
  • If you wish to exclude all Multimedia Records and External Files, then tick Exclude Multimedia records.
  • Untick the Use Full File Paths for External File Links option, and finally click OK.
  • Set Save in: to the \Public\Public.fh_data project folder, set File name: to Public.ged, and click Save.
  • Click Yes to both Do you want to replace it? and to Do you wish to view the exported file?.
  • On the Public.ged use File > Split Tree Helper, select Delete all Individual records found by the Individual query below and choose Has Flag query.
  • Select each Delete Note/Multimedia/Source/Repository Records left with no links to them option, click Delete button, select Living flag, and click OK.
  • However, the Do not delete any Note/Repository Records options may be preferred to retain unlinked Note or Repository Records.

This step can be adjusted in the Split Tree Helper to delete whichever combination of Individual Records you prefer.

Split Tree Helper for GEDCOM Without Individuals

Merge GEDCOM Files

This step uses the Merge/Compare Files feature to create one GEDCOM file from the above two files.

  • On the Public.ged use File > Merge/Compare File > OK, select the NoFacts.ged file, click Open, choose Suggest candidate matches for merging and click OK.
  • The Individuals tab should list Null Merge for most Individuals and * Add * for the Living Individual records with no Facts.
  • The Families tab should list Null Merge for most Families and * Merge * or * Add * for Family records with Living Individuals.
  • The * Merge * cases are where one spouse &/or a child is Living and you need to decide if the Family Facts are to be kept or deleted.
  • Expand each * Merge * case in turn and if desired select every Family Fact and click Discard button (typically where a spouse is Living).
  • The other tabs should all simply list Keep for every record (except Headers where the old Header is Discarded by default).
  • Click the Merge button.
  • In reply to Not all records have been flagged as 'checked'. … Proceed anyway? click OK.
  • Untick the Create a new Source record to … option, click OK, and finally click Close.

This should result in a Public database with no Facts for Living Individuals except possibly some Family Facts if you wish.
Full Source Citations and Multimedia (if desired) are retained for all retained Facts.

Merge GEDCOM Files

Delete Sources & Media For Living People

Although all the Facts have now been excluded from the Individual Records for Living people, there may still be Source Records containing details of these Living people.

For example, the deceased parents of living people may still have Occupation, Residence, or other Facts with citations to Birth, or Marriage, or other Source Records with details of their living children!

So, not only must the Facts for Living Individuals be deleted, but also all the Source Records that were linked to those Facts must be deleted, even if they are linked to other retained records.

Similarly, those deleted Source Records may have been linked to Multimedia Records holding details of Living Individuals, and still linked to other records, but also may need deleting.

Likewise, those deleted Multimedia Records may have been linked to Files in the Media folder of the Project, and those Media folder Files also may need to be deleted.

This process uses the =LinksTo() function and a spreadsheet to identify the Source Records and Multimedia Records that may need to be deleted.
It compares the number of record links in the original database with the number in the public database to identify these records.

Delete Sources

  • Open the original master project database.
  • Create a Custom Query of type Source with two Columns: Record =RecordId() and Links =LinksTo() sorted by Record Id.
  • Run the Query and copy the Result Set into columns B and C of a spreadsheet.
  • Open the new Public project database.
  • Run the same Query and copy the Result Set into columns E and F of the same spreadsheet.
  • In this spreadsheet, enter the Excel function =IFERROR(VLOOKUP(B1,$E$1:$F$999,2,FALSE),C1)-C1 into cell A1 and copy it down the entire column.

Delete Sources Spreadsheet

The spreadsheet function subtracts the number of links (column C) per record (column B) in the original database from the number of links (column F) for the matching record (column E) in the public database. Where there is no matching record it uses the original number of links (column C).

Any negative value in column A identifies those Source Records that have lost links to deleted Facts and themselves may need deleting.

Sorting the spreadsheet on column A will bring all these entries to the top of the list.

The Source Records have to be inspected and deleted from the Public database by hand.

Delete Multimedia

  • Open the original master project database.
  • Create a Custom Query of type Multimedia with two Columns: Record =RecordId() and Links =LinksTo() sorted by Record Id.
  • Run the query and copy the Result Set into columns B and C of a spreadsheet.
  • Open the new Public project database.
  • Run the same Query and copy the Result Set into columns E and F of the same spreadsheet.
  • In this spreadsheet, enter the Excel function =IFERROR(VLOOKUP(B1,$E$1:$F$999,2,FALSE),0)-C1 into cell A1 and copy it down the entire column.

Delete Multimedia Spreadsheet

The spreadsheet function subtracts the number of links (column C) per record (column B) in the original database from the number of links (column F) for the matching record (column E) in the public database. Where there is no matching record it subtracts zero, as this represents a Multimedia Record that has been excluded where it has no Source links.

Any negative value in column A identifies those Multimedia Records that have lost links to deleted Sources and themselves may need deleting.

Sorting the spreadsheet on column A will bring all these entries to the top of the list.

The Multimedia Records and associated Media Files have to be inspected and deleted from the Public database by hand.

In some cases the original master database Multimedia Records may need inspecting to determine the Media Files that need deleting.

Delete Notes & Repositories

To be absolutely thorough, it may be necessary to repeat the above process for other records.

Linked Note Records and Repository Records may hold details of living people that needs deleting.

Change Names For Living People

If you wish to make the Living Individual Records anonymous, their names need to be deleted, or replaced with 'Name Withheld' or similar.

Delete Names

  • Open the Public database.
  • Create a Custom Query of type Individual with the Column: Name %INDI.NAME[1]% and Rows Filter: Add if =HasFlag(%INDI%,”Living”) is true.
  • In the Results Set, select the entire Name column, then press the Delete key, and OK the warning.

Change Names

Before changing the names, it is wise to check if any Individual Records have no Name recorded, otherwise these will also get changed.

  • Open the Public database.
  • Create a Custom Query of type Individual with two Columns: Record %INDI% and Name %INDI.NAME[1]%.
  • Add two Rows Filters: Exclude if =HasFlag(%INDI%,”Living”) is true and Exclude unless %INDI.NAME[1]% is null.
  • Run the Query and if any records appear in the Results Set alter their Name field to /?/ or /Unknown/.
  • Close the Public database.

The best way to change the Name field is to delete it using the method above, and then use the Utility ~ PSPad phReplace Multiline Search and Replace to edit the Public.ged file.

Every Individual Record whose Name has been deleted will have an entry in the Public.ged file which starts as follows:
0 @I99@ INDI
1 SEX F

PSPad phReplace Multiline Search & Replace

Preserve a copy of the Public.ged file just in case of mistakes.

Then use PSPad phReplace to search for:
@ INDI
1 SEX

and replace with:
@ INDI
1 NAME Name Withheld //
1 SEX

Save the resulting Public.ged in the Public project.