Page 1 of 1
Witness reporting
Posted: 16 Dec 2014 18:35
by gsward
I have witness on some of my facts both as a linked record to an individual in my database and some as name-only. Currently these are witness to marriages and wills.
How can I report on instances of an individual occurring as a witness in a custom query? Ideally for both types of event. The event it relates to is of course that of another individual.
Thanks.
Re: Witness reporting
Posted: 16 Dec 2014 18:48
by PeterR
The Fields available for Witness> and for Witness (name only) are listed in the Columns tab for Fact Queries.
Re: Witness reporting
Posted: 16 Dec 2014 19:07
by tatewise
To expand on Peter's answer the following explanation may help.
Witness Individuals have no actual Facts to identify them as Witnesses, because the Facts are linked to the Principles.
So you have to start with a Facts Query that includes all Facts.
In the Columns tab add the Witness tag details as Peter said.
You then apply Row filters, to first exclude Facts without Witnesses, then select only Facts with a desired Label perhaps via a user Prompt, and finally filter by Witness Individual or by Witness Name also via user Prompts.
If you need further help with this then please ask.
Re: Witness reporting
Posted: 24 Dec 2014 19:45
by tatewise
A snag with the above approach is when there are several Witnesses to one Fact.
Each Witness needs a separate Column for that instance.
e.g.
%FACT._SHAR[1]>NAME[1]% for 1st Witness,
%FACT._SHAR[2]>NAME[1]% for 2nd Witness, and so on...
Re: Witness reporting
Posted: 26 Dec 2014 09:53
by Jane
I suspect this will be a good one for a plugin. The next week is a bit hectic, but if not one else want's to give it a go, I will take a look in the New Year.
Re: Witness reporting
Posted: 27 Dec 2014 12:34
by Jane
I have attached a quick plugin, you select the list of people (one or more) you want to find Witness events for and it returns a list of all the Facts they are listed against.
Re: Witness reporting
Posted: 27 Dec 2014 15:44
by gsward
Thank you I can confirm that works for me.
Re: Witness reporting
Posted: 26 Jan 2015 17:24
by Jenny143
When I try to run the List all Witness Events Plugin I get the following error message
[string"C:\ProgramData\Calico Pie\family\Historian\...":152:fhOutputResultSetColumn - Invalid arguement (2). No changes have been made to data records.
Have I done something wrong - I have tried deleting and re-installing but get the same message.
Jenny

Re: Witness reporting
Posted: 26 Jan 2015 18:23
by tatewise
Jenny, do you have only Name only (_SHAN) Witnesses, because an inspection of the script suggests the Plugin only deals with Linked Individual (_SHAR) Witnesses, and fails when there are none.
What were you hoping the Plugin would list?
Re: Witness reporting
Posted: 26 Jan 2015 21:07
by Jenny143
Hi Mike,
That explains it. I was hoping to create a list of all name only witnesses. I can create queries for bmd events but my problem lies with trying to find a way of listing all 'extra' people in census households in one list.
Jenny
Re: Witness reporting
Posted: 29 Jan 2015 14:55
by tatewise
Jenny, the attached Plugin Lists all Name Only Witnesses.
Re: Witness reporting
Posted: 29 Jan 2015 20:55
by Jenny143
Mike,
Thank you this is absoultely fantastic, exactly what I was looking for.
Very many thanks.
Jenny

Re: Witness reporting
Posted: 13 Jul 2021 16:08
by obstinatesnooper
Jane wrote: ↑27 Dec 2014 12:34
List all Witness Events.fh_lua
I have attached a quick plugin, you select the list of people (one or more) you want to find Witness events for and it returns a list of all the Facts they are listed against.
This is awesome!
I added two columns for the record ids of the record and owner to the plugin output by trial and error (to use unique ids to link data in Excel & Gephi analysis), but I don't understand what ":Clone()" is or if it is needed.
column headings
Code: Select all
tblResults.source = {title='Source'}
tblResults.target = {title='Target'}
column values
Code: Select all
tblResults.source:set(id)
tblResults.target:set(fhGetRecordId(ptrOwner:Clone()))
Searching for "clone()" in the KB brings up only stuff about cloning facts and diagrams, not anything about plugins.
Re: Witness reporting
Posted: 13 Jul 2021 16:27
by tatewise
In the
Tools > Plugins window where you
Run and
Edit... plugins, click the
How to Write Plugins button and checkout the help for
The Family Historian API > Objects > Item Pointer > Clone.
Alternatively, when editing a plugin script, click
Help > Family Historian API to reach the same help pages.
It is important to
Clone pointers otherwise any change to the original pointer will also affect the copy pointer.
For general advice see FHUG Knowledge Base
https://fhug.org.uk/kb/topic/plugins/writing-plugins/.
Re: Witness reporting
Posted: 18 Jul 2021 15:34
by obstinatesnooper
Jane wrote: ↑27 Dec 2014 12:34
List all Witness Events.fh_lua
I have attached a quick plugin, you select the list of people (one or more) you want to find Witness events for and it returns a list of all the Facts they are listed against.
It seems this isn't compatible with v7? I keep getting an error:
[string "C:\Program Data\..."]:61: attempt to index a nil value (global 'arg'). No changes have been made to the data records
I looked for it in the plugin store but couldn't find it, so I fiddled with the code a bit and got it to run in v7. Revised attached below, and sorry if this stomps on toes.
Re: Witness reporting
Posted: 07 Apr 2022 16:09
by Lovelyclemmy
The List Name Only Witnesses plug-in seems to have the same problem as the List All Witnesses Events had before updated for v7. Is there a v7 available of the Name Only plug-in?
Thanks Lesley
Re: Witness reporting
Posted: 07 Apr 2022 16:23
by tatewise
Yes, try the Attachment.
Re: Witness reporting
Posted: 20 Feb 2023 11:17
by tatewise
A
List Fact Witness Details plugin is in the Plugin Store and combines the features of the plugins attached to this thread, and which will shortly be deleted.