Page 1 of 1

Witness sentence

Posted: 08 Nov 2016 08:41
by Shelley
I want to capture witness sentences as output in narratives.

The function FactSentence() does what I want but only for principals. TimelineFactText() also comes close as it returns the timeline sentence (used on the facts tab) for witnesses - but not the carefully crafted narrative sentence. I can't see an obvious way using a plugin.

Have I missing something?

Thanks
Shelley

Re: Witness sentence

Posted: 08 Nov 2016 12:19
by tatewise
You are correct, there appears to be no obvious way to get that Sentence from the perspective of the Witness.

You can use the equivalent of FactSentence(%INDI.~SHAR[n]>%) where n is the nth instance of this Individual being a Witness, and thus obtain the Sentence from the perspective of the Principal.
See the FH Help on Understanding Data References for details of the ~SHAR shortcut.
But I cannot find a way of using that to get the Witness form of the Sentence.

What exactly are you trying to achieve?

Edit: I have asked Calico Pie about this and they confirm the Witness Sentence cannot be retrieved.

Re: Witness sentence

Posted: 09 Nov 2016 08:45
by Shelley
I was thinking of tinkering with your Give Witnesses Their Own Facts and/or Export Gedcom File plugins if I could work out how :D

I have a TNG website. I'd like witnesses to have a single type of fact called "Witness" with the same date, place and sources as the event they witnessed, and use the witness sentence as the note.

Re: Witness sentence

Posted: 09 Nov 2016 11:41
by tatewise
Shelley, I have moved this to the Plugin Discussions Forum that seems more appropriate.

I would not recommend tinkering with the Export Gedcom File Plugin, because it is very complex and easily upset, since it has to deal with so many Gedcom anomalies in so many products.
Have you reviewed:
plugins:help:export_gedcom_file:tng_the_next_generation|> Export Gedcom File ~ (TNG) The Next Generation
plugins:help:export_gedcom_file:std_standard_gedcom_5.5|> Export Gedcom File ~ (Std) Standard Gedcom 5.5
"Choose UTF-8 with a Byte Order Mark for the TNG alternative UTF-8 option that offers full Unicode support."
"Fact Witnesses (_SHAR, _SHAN, ROLE)
Each witness role is converted to a Fact local Note with a Witness Role: label.
A synthetic Fact is created for each Individual Witness with the owner of the original Fact having the Witness Role: of Principal."
Synthetic Facts have a prefix Ω character to differentiate them from originals, but otherwise are identical to originals.
I don't think anything else creates synthetic Facts for TNG, so the Ω uniquely identifies Witnessed Facts.
So you could post-process exported Gedcom and convert each Fact starting with Ω to use your custom Witness fact Tag, but there is no easy answer for the Sentence Note.

The Give Witnesses Their Own Facts Plugin would be easier to adapt.
Perform("fhCreateItem",strFact,ptrWitn) on line 194 needs to replace strFact with your custom Witness fact Tag.
The subsequent Note update needs to include fhCallBuiltInFunction("FactSentence",ptrFact)
i.e. the Sentence from the perspective of the Principal which is the best available.
Then the Export Gedcom File Plugin should export what you want.

Re: Witness sentence

Posted: 10 Nov 2016 03:04
by Shelley
Thanks Mike, that's very helpful. I think I will be able to get close to what I want by tweaking the Give Witnesses Their Own Facts plugin as you have suggested.

Re: Witness sentence

Posted: 10 Nov 2016 10:32
by tatewise
OK, but I hope you have actually examined the synthetic Witnessed Facts exported by default for TNG?
For example the Residence & Marriage facts in FH Sample Project export the following style facts:

Code: Select all

Fact:     Ω Residence Role
Date:     from 29 May 1957 to 30 Sep 1965
Place:    Clifton Wood, Bristol
Address:  2 Clifton Wood, Bristol
Note:
	Large 5 bedroom terraced house, opposite the docks, ...
	Witness Role:  Principal  [I1]	Anthony Edward MUNRO%9 OBE
	Witness Role:  Resident   [I3]	Susan Isabel DOWLING
	Witness Role:  Resident   [I8]	Judy Susan MUNRO
	Witness Role:  Resident   [I6]	Ian Stephen MUNRO
	Witness Role:  Resident   [I7]	Sally Theresa MUNRO
and

Code: Select all

Fact:     Ω Marriage Role
Date:     October 1920
Place:    Morpeth, Northumberland, England
Address:  Church
Note:
	Witness Role:  Principal  [F3]	...of Michael MUNRO and Catherine REARDON
	Witness Role:  Bridesmaid [I7]	Sally Theresa MUNRO
	Witness Role:  Bridesmaid Witness Note
with the same Source Citations as original fact.
The Ω symbol and word Role identifies those Witnessed Facts just like the blue arrow does in FH.
The Date, Place, and Address fields are all included.
The Principal and all the Witness Roles and notes are listed in the Note field.
So I do not see what benefit the Narrative Sentence adds, nor naming all those facts as Witness.

Re: Witness sentence

Posted: 10 Nov 2016 12:39
by Shelley
Yes, I've been using the plugin for a while but haven't worried about witnesses up until now.

Only using one Witness tag instead of multiple event-specific witness tags simplifies administration of my TNG site. When you upload data to TNG you can either accept all new custom tag types or only take those types you have previously approved. I use the second option as a safety measure in case I miss something when cleaning up the file. If there's only one new tag type then I only have to remember to go in and fix the settings once.

As for the benefit of using the narrative sentence, it's purely personal preference.

Re: Witness sentence

Posted: 22 Nov 2016 20:07
by tatewise
Shelley, take a look at the current 22nd November postings in Witness role exported to TNG (14332) where it has been discovered that TNG supports the _SHAR Witness/Shared Event tag to some extent already, and maybe offers you an alternative approach.