Page 1 of 1

Name-Only Witnesses not imported (RM to FH)

Posted: 09 Feb 2021 00:28
by LeslieP
Name-Only Witnesses do not survive the export from RM7 and import to FH7.

Both RM and FH support name-only witnesses with roles, however, FH and RM write that out to Gedcom differently and FH doesn't understand how RM is showing it. Is this something that an import plugin could fix?

I don't have very many of these, so it's not a showstopper for me, but I can imagine other RM users could get a bit put off by it.

To illustrate, a 1900 Residence fact, the principal with Spouse, Sibling, and Child, all linked individuals in the database, and Hannah Green, cousin. Hannah isn't in the database, she's just listed by name.

RM GEDCOM OUTPUT:

Code: Select all

1 RESI
2 DATE 1900
2 PLAC Columbus, Franklin, Ohio, United States
2 _SHAR @I754@
3 ROLE Spouse
2 _SHAR @I755@
3 ROLE Sibling
2 _SHAR @I756@
3 ROLE Child
2 _SHAR
3 GIVN Hannah
3 SURN Green
3 ROLE Cousin
This fact imports perfectly with the Spouse, Sibling, and Child connected. The import log file indicates that Hannah has been excluded. Once I go into FH and add her back in, the FH created Gedcom looks like this:

FH GEDCOM OUTPUT:

Code: Select all

1 RESI
2 DATE 1900
2 PLAC Columbus, Franklin, Ohio, United States
2 _SHAR @I754@
3 ROLE Spouse
2 _SHAR @I755@
3 ROLE Sibling
2 _SHAR @I756@
3 ROLE Child
2 _SHAN Hannah Green
3 ROLE Cousin
You can see, RM creates a 2 _SHAR with no id number, adds GIVN and SURN items. FH creates 2 _SHAN followed by the name. Not hugely different, but enough to cause the import to hiccup

As I said, this is something I can re-enter manually for myself, the log file is GREAT about making clear anything that needs to be addressed, I'm just wondering if there is some way for some smart coding person to write a routine that could tweak the RM Gedcom to make it import properly.

In plain English: Anywhere there is 2 _SHAR not followed by " @" change to 2 _SHAN and concatenate GIVN and SURN.

I don't write code, pathological fear of regex, just wondered if this might be something that could be done.

Re: Name-Only Witnesses not imported (RM to FH)

Posted: 09 Feb 2021 10:48
by tatewise
If the GIVN and SURN tags do not import to FH as UDF then it makes a Plugin more difficult but not impossible.
A Plugin would have to read the RM GEDCOM file to identify where the GIVN & SURN belong and insert them into the Project.

It is probably easier to edit the RM GEDCOM file prior to import to FH.
There is not any need for RegEx as the Windows Notepad plain text editor can perform the adjustment.

It simply needs to perform two global replacements:
2 _SHAR
3 GIVN
becomes
2 _SHAN
and
3 SURN
including the preceding newline becomes nothing.

Alternatively, a Plugin could be run in any Project and perform the same edit once the GEDCOM file is chosen.

BTW: There is no conflict with genuine NAME.GIVN and NAME.SURN tags because they are 2 GIVN and 2 SURN.

Re: Name-Only Witnesses not imported (RM to FH)

Posted: 10 Feb 2021 17:57
by TMG_refugee
Mike,
I read your response with great interest as I have been adding witnesses that are not part of the family tree as just names. I didn’t want to clutter up my family tree.
RM puts out the following:
1 CHAN
2 DATE 10 FEB 2021
1 BIRT
2 _SHAR
3 GIVN Harry
3 SURN Jones
3 ROLE Witness

This produced the previously illustrated error message. I then proceeded to follow your instructions and change 2 _SHAR to 2 _SHAN This eliminated all the error form the import. But it did not bring over the shared person. I tried several different methods of converting the 3 GIVN and 3 SURN to no avail. No errors but also no witness.
I then created the shared person in FH and exported and got this:
1 CHAN
2 DATE 10 FEB 2021
1 BIRT
2 _SHAN Harry Jones
3 ROLE Witness

I changed the RM export to reflect this and the import worked 100%. If this is true then it will not be a simple change all in an editor but I will need to combine three lines into one. It will probably make sense to not use a name only but add these people to my database as unrelated people.

I tried this from RM to FH and it worked 100%

Re: Name-Only Witnesses not imported (RM to FH)

Posted: 10 Feb 2021 20:36
by tatewise
Please check what my edit actually proposes:

Firstly, search for both 2 _SHAR and 3 GIVN all as one search term involving two lines but NOT the GIVN name:
2 _SHAR
3 GIVN

Replace with 2 _SHAN so the GEDCOM will now look like:
2 _SHAN Harry
3 SURN Jones
3 ROLE Witness

Secondly, search for 3 SURN including the preceding newline but NOT the SURN name:

3 SURN

Replace with nothing so the GEDCOM will now look like:
2 _SHAN Harry Jones
3 ROLE Witness

Those replacement edits can be performed globally with the simplest plain text editors like Windows Notepad.