* Deleting Unused Fact Type

Questions regarding use of any Version of Family Historian. Please ensure you have set your Version of Family Historian in your Profile. If your question fits in one of these subject-specific sub-forums, please ask it there.
Post Reply
User avatar
Gary Carson
Famous
Posts: 162
Joined: 02 Mar 2016 17:46
Family Historian: V7
Location: Grand Island, Nebraska, USA

Deleting Unused Fact Type

Post by Gary Carson » 07 Mar 2016 04:47

Have database with Fact Type that is unused yet appears in a number of individual records. I want to delete that record type from all individual records that have no values. How can I delete without doing each individually?
Gary
Win 10, FH 7.0.15

User avatar
tatewise
Megastar
Posts: 27088
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: Deleting Unused Fact Type

Post by tatewise » 07 Mar 2016 11:10

You might be able to use the Change Any Fact Tag Plugin from the Plugin Store.

Please clarify by what you mean by 'unused' and 'have no values'.

Perhaps it is an Attribute with no value in the box labelled with its name, above Date & Age?
Whereas other Facts with the same name do have a value in that box?

Or do you mean the Facts have no Date, Age, Place, Address, Note field values?
If so, then do the ones with values that you want to retain always have a Date or Place value?

The reason I ask is the Plugin has Value, Date & Place filters that with a little trickery can detect empty fields, but since you are a newcomer I need to explain how to use them.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry

User avatar
Gary Carson
Famous
Posts: 162
Joined: 02 Mar 2016 17:46
Family Historian: V7
Location: Grand Island, Nebraska, USA

Re: Deleting Unused Fact Type

Post by Gary Carson » 07 Mar 2016 13:24

The Fact appears in several records. In each of the records I am interested in, there are no entries in any of the fields; thus the entire dialog is empty. I want to delete the empty Facts from the individual records and retain the rest of the individual record. I want to keep other individual records that have values entered in one of the fields.

When I say empty; when looking in the dialog box for the Fact there are no entries in any field.

The Fact I am dealing with currently in a small database is Christened (Standard)
Individual records I want to delete the Fact from have no values in the Date; Age; Place; Address; Note; or Source.

Process could apply to any set of records with a group "empty" Facts.
Gary
Win 10, FH 7.0.15

User avatar
tatewise
Megastar
Posts: 27088
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: Deleting Unused Fact Type

Post by tatewise » 07 Mar 2016 15:29

OK, actually you can do that with a Custom Query from fhugdownloads:contents:query_all_empty_facts|> Query:Fact ~ All Empty Facts.

Download and install, then use View > Custom Queries > All Empty Facts which will list EVERY empty Fact.
Click on the Label column heading to group similar Facts together.
Select any entries from the Fact column and press the Delete key on your keyboard or use Edit > Delete, heed the warning, and click OK if happy to continue..
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry

User avatar
PeterR
Megastar
Posts: 1129
Joined: 10 Jul 2006 16:55
Family Historian: V7
Location: Northumberland, UK

Re: Deleting Unused Fact Type

Post by PeterR » 07 Mar 2016 17:48

There is a problem with that Custom Query, because the following is evidently not a valid Expression and so cannot be used to exclude rows where the only populated field for Emigration is To.

Code: Select all

=IsTrue(%FACT._PLAC% = "")
Peter Richmond (researching Richmond, Bulman, Martin, Driscoll, Baxter, Hall, Dales, Tyrer)

User avatar
tatewise
Megastar
Posts: 27088
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: Deleting Unused Fact Type

Post by tatewise » 07 Mar 2016 18:33

Yes, that is an interesting one, although unlike there would a be a To without a From, and it is listed under Fact column.

I'll look to see if there is a workaround, or maybe needs reporting to Calico Pie.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry

User avatar
tatewise
Megastar
Posts: 27088
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: Deleting Unused Fact Type

Post by tatewise » 07 Mar 2016 22:40

Here is a workaround that I will add to the KB Query.
The Rows filter tab needs two more expressions.

Exclude if =IsTrue((FactName(%FACT%) = "Emigration") and Not(%FACT% = "Emigrated")) is true

Exclude if =IsTrue((FactName(%FACT%) = "Immigration") and Not(%FACT% = "Immigrated")) is true

This works because the %FACT% text says Emigrated to <place> or Immigrated from <place> when the To/From field value exists.

[EDIT: It has come to my notice that Fact Query Disallows To/From _PLAC Tag was reported during FH V6 Beta testing early in 2015 and is logged with Calico Pie.]
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry

Post Reply