* Expression guidance please

Questions about the various ways of sharing your research with others
Post Reply
avatar
Thoth McKewn
Silver
Posts: 6
Joined: 03 Aug 2018 19:31
Family Historian: V6

Expression guidance please

Post by Thoth McKewn »

Hello. I have a custom report which includes the Name(FULL) expression and also a column for the Name Suffix expression. My problem is that the Name (FULL) expression also shows the suffix. I would like the name without the suffix and have tried constructing an appropriate expression without success. If anyone has any suggestions these would be appreciated. Thanks Tom
User avatar
LornaCraig
Megastar
Posts: 3204
Joined: 11 Jan 2005 17:36
Family Historian: V7
Location: Oxfordshire, UK

Re: Expression guidance please

Post by LornaCraig »

What expression are you using for the full name?

%INDI.NAME:FULL% should give the full name without the suffix.

%INDI.NAME:ADORNED_FULL% will give the full name including any prefix and suffix.
Lorna
User avatar
tatewise
Megastar
Posts: 28436
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: Expression guidance please

Post by tatewise »

Tom, it would help us to help you if you explained exactly where you are using those expressions and posted a copy of the expression itself.

You mentioned columns, so I wonder if you are talking about a Query rather than a Report.
Also, there are 2 types of Name suffix: 1) Text after the /Surname/ in Name box; 2) Separate Name Suffix box.

Sometimes posting a screenshot illustrating the problem can save a lot of description.
See FHUG Knowledge Base > Forum Usage under Attachments and Taking Screenshots for how to do that.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
avatar
Thoth McKewn
Silver
Posts: 6
Joined: 03 Aug 2018 19:31
Family Historian: V6

Re: Expression guidance please

Post by Thoth McKewn »

Mike/Lorna Thanks for your responses. This is my first post so didn't know what the protocols were. I used the word 'report' but, yes, I am talking about a query.
I have tried Lorna's suggestions but as you can see from the attached screen grabs these columns still produce names and suffix with no discernible difference. As there is a dedicated suffix expression I assume there is a way for names to be shown without it.
Attachments
FH Query Report Suffix Problem 2.JPG
FH Query Report Suffix Problem 2.JPG (64.71 KiB) Viewed 351 times
FH Query Report Suffix Problem.JPG
FH Query Report Suffix Problem.JPG (179.25 KiB) Viewed 351 times
User avatar
tatewise
Megastar
Posts: 28436
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: Expression guidance please

Post by tatewise »

There are two types of Name suffix:
1) Text after the /Surname/ in the Name box, i.e. part of the INDI.NAME field.
2) Separate Name Suffix box, i.e. the INDI.NAME.NSFX field.

It looks like your data uses both fields to hold the same value, i.e. USA in both.

All the NAME qualifiers seem to include the 1st suffix above and display it as the 1st USA after each Surname.

The NAME:..._FULL qualifiers also include the NSFX field, which explains why USA appears twice.

However, I may be mistaken with some of those. It would be clearer with some test cases using different values for first names, middle names, surnames, and both types of suffixes.

The solution depends on how you want to move forward.
e.g. Do you want to eliminate the duplication?
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
avatar
Thoth McKewn
Silver
Posts: 6
Joined: 03 Aug 2018 19:31
Family Historian: V6

Re: Expression guidance please

Post by Thoth McKewn »

The duplication is not a problem per se as these fields were only in my query as an experiment. What I am hoping to achieve is a stand alone full name without any suffix. This is what I had before I added the USA, etc. into Ancestry's record.
User avatar
tatewise
Megastar
Posts: 28436
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: Expression guidance please

Post by tatewise »

That then leads on to how you interoperate between Ancestry and FH.
It is not recommended that you transfer GEDCOM back and forth between the two products.
The conventional advice is to make one product hold your master Project data (ideally FH) and only export from that product to other products as required. Then you won't suffer the Ancestry suffix contamination.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
User avatar
Mark1834
Megastar
Posts: 2519
Joined: 27 Oct 2017 19:33
Family Historian: V7
Location: South Cheshire, UK

Re: Expression guidance please

Post by Mark1834 »

Mike is correct in identifying that the USA part is duplicated, but you may find his explanation slightly confusing.

The root cause is differences between how Ancestry and FH store and process names. Ancestry has a fixed USA-style Given - Surname - Suffix format for names (e.g. John Doe III). When it exports a GEDCOM, it includes the NAME (John /Doe/ III, where the slashes denote the surname), but also identifies the three components separately, so the full export in this case would read

Code: Select all

1 NAME John /Doe/ III
2 GIVN John
2 SURN Doe
2 NSFX III

FH has a much more flexible and comprehensive approach to names, and permits both Western given-first and Asian surname-first styles. As such, it cannot regard name elements that come after the identified surname as a suffix (and IMO it is misleading to call it that), as it could be part of the given name, or some other unidentified name element. In FH, name prefixes and suffixes are always identified solely from the additional GEDCOM fields, never from their assumed position in the full name.

It therefore follows that when FH imports the Ancestry GEDCOM, it regards the top level tag as the core name (including the Ancestry suffix), but it also sees the additional suffix identification and adds this to the name as well.

This illustrates a very common issue with GEDCOM data transfer - it is a "standard" of sorts, but interpretation and implementation of that standard varies hugely between different applications. Ancestry in particular has a rather poor reputation for strict GEDCOM compliance, as it has imposed its own Western-centric interpretation of what it thinks the data "should" look like, whereas true GEDCOM (and FH's interpretation) is much more flexible than that.
Mark Draper
User avatar
tatewise
Megastar
Posts: 28436
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: Expression guidance please

Post by tatewise »

Mark is absolutely correct.
However, users often ask how to enter names such as John Smith Snr or Jack Jones III such that they display fully in the Focus Window, etc.
To achieve that you must enter John /Smith/ Snr or Jack /Jones/ III in the NAME field. The NSFX field won't do that.
In Western terms, the Snr or III is a suffix.

It is still the case that if FH is maintained as the master Project then such Ancestry data won't upset FH.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
avatar
Thoth McKewn
Silver
Posts: 6
Joined: 03 Aug 2018 19:31
Family Historian: V6

Re: Expression guidance please

Post by Thoth McKewn »

Thanks for the insight about the handling of suffixes in FH and Ancestry. For my sins my prime database is Ancestry and mainly use FH to download csv files for, in my case, easier handling and error finding. I have obviously made a fundamental mistake in using the Ancestry suffix field to identify the countries I should be focusing on for my research and as such they were only going to be temporary. This may change if there is a FH solution (see below).
Guided by you and using MS Word I have looked at the GEDDCOM file where / USA, etc. occurs and have removed the necessary coding, reloaded it into FH and now those names in the Name(FULL) column are suffix free.
Is my understanding that the same result can't be done in FH correct, which I doubt, or am I stuck with the 'Word' work around?
Attachments
FH Query Report Suffix Problem 3.JPG
FH Query Report Suffix Problem 3.JPG (129.87 KiB) Viewed 251 times
User avatar
tatewise
Megastar
Posts: 28436
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: Expression guidance please

Post by tatewise »

Presumably, the suffix value will not always be USA and could be other values.
It is easy enough to delete all the NSFX fields by using a Query.
The NAME field 'suffix' can also be deleted using the Search and Replace plugin.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
avatar
Thoth McKewn
Silver
Posts: 6
Joined: 03 Aug 2018 19:31
Family Historian: V6

Re: Expression guidance please

Post by Thoth McKewn »

I've tried the Search and Replace Plugin and it finds two instances of, for example USA, for each person, one in the name field the other being the NSFX field. What I seemingly can't do en masse with this tool is to replace the first but leave the second as the second is the field is the one I need for my query. If I am missing something please let me know but at the moment it looks like the 'Word' find and replace solution is the more practical for my requirements.
User avatar
tatewise
Megastar
Posts: 28436
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: Expression guidance please

Post by tatewise »

Use the following settings and it will remove any trailing suffix only in NAME field.
It using the advanced pattern matching feature.

image.png
image.png (75.36 KiB) Viewed 232 times
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
avatar
Thoth McKewn
Silver
Posts: 6
Joined: 03 Aug 2018 19:31
Family Historian: V6

Re: Expression guidance please

Post by Thoth McKewn »

This has cleared all the country codes I use including USA. It's been an interesting learning experience. Thanks for your help. Tom
Attachments
FH Query Report Suffix Problem 4.JPG
FH Query Report Suffix Problem 4.JPG (192.4 KiB) Viewed 209 times
Post Reply