Page 2 of 4
Re: Assigning a fact to multiple individuals
Posted: 24 Oct 2016 15:47
by DavidNewton
jimlad68 wrote:Have you any other 'goodies' hidden away!
Jim
I think that most of us who use Family Historian and dabble (and I use the word with accuracy in my case) with Lua have a load of single purpose plugins often specifically adapted to our own way of doing things and hence not really suitable for public consumption. When a thread like this one shows up I usually have a go at writing a plugin just to see if I can do it and in most cases fail or don't get to finish before our resident wise old owl.
David
Re: Assigning a fact to multiple individuals
Posted: 24 Oct 2016 16:36
by tatewise
Attached is prototype Copy Fact to Chosen Records Plugin Version 0.2 Date 24 Oct 2016.
[Attachment deleted as now superseded.]
This works just like Version 0.1 except that if there are multiple Citations of chosen Source then it searches for a Fact with one of those Citations within the Owner record with the latest Updated Date.
i.e. It finds the Fact that was updated last and cites the chosen Source.
If there is only one Citation then it is guaranteed to work correctly, but with multiple Citations and several Facts in same record all citing the chosen Source then the last Fact added may not get picked. Also Plugins can only retrieve the Updated Date and not Time so several records may be candidates for the latest Fact.
To cope with that scenario the Plugin needs to list all alternative Facts and let the user choose, but that is for another day.
Re: Assigning a fact to multiple individuals
Posted: 24 Oct 2016 22:16
by jimlad68
Mike, Done a quick test and seems OK except for your known limitation.
Your future fix for list all alternative Facts and let the user choose sounds ideal.
Less ideal, but possibly a simpler solution would be when you get the message Is this the Fact to be copied, to cycle through any remaining facts, in a similar manner to the search and replace. At present if you answer no the plugin ends after the first fact choice. I suppose you could argue that search and replace would be easier with a list to choose from, but I suspect that would be much more difficult as there are more fields to consider.
Re: Assigning a fact to multiple individuals
Posted: 24 Oct 2016 23:01
by tatewise
Yes, it is where Is this the Fact to be copied appears that would list all alternative Facts and let the user choose.
The number of such Facts should be relatively small as they must all Cite the chosen Source and exist within records updated on the same latest Date. It is a pity that the Updated Time cannot be retrieved as that would shorten the list dramatically.
Search and Replace can easily have thousands of matching items, which is far too many for one list, and they can be all varieties of fields, and the user needs to accept or reject each entry on the list. In practice it is usually possible to use the filters to ensure only the desired fields are included in the search.
Whereas for this Copy Fact... plugin only one Fact needs to be chosen, which is easy with a simple GUI drop-list.
Re: Assigning a fact to multiple individuals
Posted: 26 Oct 2016 10:29
by tatewise
I had an inkling that the LastUpdated() function can return Date, Hours & Minutes in Plugins in FH V6, but it is not documented in the Help despite an long-standing request to Calico Pie. I have now remembered how to do it and included it in the Plugin with a workaround for FH V5 that uses time 00:00. By using Date & Time it reduces the chance in FH V6 of finding more than one 'latest' Fact that cites the chosen Source. When I get around to providing a drop-list of all such Facts updated on same Date & Time then for V6 it should be a very short list.
Attached is prototype Copy Fact to Chosen Records Plugin Version 0.2 Date 26 Oct 2016 incorporates that change.
Re: Assigning a fact to multiple individuals
Posted: 27 Oct 2016 15:03
by jimlad68
Mike, given that a test with a few new entries and it picked the last updated one.
I suppose whereas INDIviduals and SOURces have a time stamp in the Gedcom, and Facts do not, it allows for your time check for sources, but not for facts.
However I do think that David's 'starting point' has another merit as it also gives the opportunity to copy Facts that do not have a source. I suppose the plugin Clone any Record adds another duplication dimension.
Re: Assigning a fact to multiple individuals
Posted: 27 Oct 2016 16:41
by tatewise
You misunderstand Jim.
The Plugin starts from a Source record, even an existing Method 2 Source.
It then searches for Facts that cite that chosen Source.
For each such Fact it checks the Update Date & Time of the owner Individual (or Family) record.
The Fact within the latest updated owner record is the chosen one.
It is nothing to do with the Update Date & Time of the chosen Source record, which if a Method 2 Source will not have changed just because a new Fact cites it.
Certainly David's Plugin has merit, and offers an alternative, which if the whole concept becomes popular could be incorporated into my Plugin with a user interface dialogue to choose alternative strategies.
Clone Any Record of course is no use for Facts.
Re: Assigning a fact to multiple individuals
Posted: 27 Oct 2016 18:12
by LornaCraig
which if a Method 2 Source will not have changed just because a new Fact cites it.
As an aside, I have often wondered why the updated date/time for a Source record changes if one of its citations is deleted, but not if an extra citation is added. Is there a logical explanation for this?
Re: Assigning a fact to multiple individuals
Posted: 27 Oct 2016 19:08
by tatewise
I had not noticed that before Lorna, and it is inexplicable.
It actually applies generally such as for links to Notes, and to Repositories.
Adding a link does not change Updated, but removing it does!
Re: Assigning a fact to multiple individuals
Posted: 27 Oct 2016 19:44
by jimlad68
Well, as ever that raises more questions than answers.
So, is a date+time stamp kept for Facts, but is lost when the Gedcom is saved, so only available for that session?
I have these 2 FACT query columns:
=LastUpdated(FactOwner(%FACT%,1,MALES_FIRST))
=LastUpdated(GetRecord(%FACT%))
It looks like these only display the last time the INDIvidual was updated (I.e. it gives the same time stamp for all Facts for an individual)
Does that mean they could be amended to show the last time each FACT was amended, rather than the whole individual? That would then help in a query to show the order that Facts within the current session had been amended/created.
Re: Assigning a fact to multiple individuals
Posted: 27 Oct 2016 20:08
by tatewise
No, only records have a Date-Time-Stamp, and Facts do not.
But since Facts are as much a component of an Individual record as Name or Note fields, then adding a new Fact changes the owner Individual record Updated value.
That is what your Query column Expressions are showing:- the Updated date of a Record associated with the Fact.
The one anomaly that you have spotted before is Family Facts such as Marriage and Divorce.
Their Owner record is the Family record, so when they change, the Family record Updated changes, but NOT the Parent Individual records.
So for Family Facts:
=LastUpdated(FactOwner(%FACT%,1,MALES_FIRST)) shows Updated date of Husband Individual record, and that date is nothing to do with the Fact.
=LastUpdated(GetRecord(%FACT%)) shows Updated date of the Family record holding the Fact.
But for Individual Facts both Expressions show the Updated date of the owner Individual record.
The Plugin assumes that the last change was to add the Fact to be copied and its Citation of a Source.
That will change the Updated value of the owner record for the new Fact.
Therefore the Plugin will pick the desired Fact via the Citation link and the latest Updated value.
If the user were to change some other record that happened to contain a Fact that cited the chosen Source record, then the Plugin would pick that wrong Fact.
Re: Assigning a fact to multiple individuals
Posted: 27 Oct 2016 20:33
by LornaCraig
tatewise wrote:I had not noticed that before Lorna, and it is inexplicable.
It actually applies generally such as for links to Notes, and to Repositories.
Adding a link does not change Updated, but removing it does!
Another inconsistency is that when you add a link from, say, a
Source Record to a
Repository or from an
Individual Record to a
Note Record the record
from which the link is made
does get a change to its
Updated info. It is only the record
to which the link is made that is not changed.
Re: Assigning a fact to multiple individuals
Posted: 27 Oct 2016 20:36
by jimlad68
Mike, Thanks for the explanation, I understood some of that from previous topics, just hoping there may be a workaround of some sort.
But FH must store the last updated details somehow, otherwise it would not be able to Edit/Undo within a session. Perhaps it takes a database snapshot of some sort instead of undoing individual records. I'm not sure if there is a limit on undos
Re: Assigning a fact to multiple individuals
Posted: 27 Oct 2016 21:14
by tatewise
The Undo limit is set in Tools > Preferences > General tab near bottom and seems to be virtually unlimited.
The Undo list is a simple ordered list of changes just like in MS Word, Excel, Notepad, etc.
That is rather different to the Updated time-stamp field.
Re: Assigning a fact to multiple individuals
Posted: 27 Oct 2016 21:25
by jimlad68
Yes, I suppose it does not need a time stamp, as long as it is in some sort of order, but then, that order must be somewhere, probably not available to FH Lua!
Re: Assigning a fact to multiple individuals
Posted: 27 Oct 2016 21:44
by tatewise
Correct, the Undo list is not currently available to Plugins or Expressions.
Re: Assigning a fact to multiple individuals
Posted: 27 Oct 2016 22:07
by jimlad68
If thought worthwhile, I suppose FH could generate a time stamp for Facts (and other things) to be saved in the Gedcom as a Gedcom Extension that could be removed for export to other programs etc. But I have no doubt there are more important things to be developed first.
Re: Assigning a fact to multiple individuals
Posted: 08 Jan 2022 18:34
by janeri
tatewise wrote: ↑26 Oct 2016 10:29
Attached is prototype
Copy Fact to Chosen Records Plugin Version 0.2 Date 26 Oct 2016 incorporates that change.
Great, thanks!
looks like this was created in 2016, but still works perfectly with FH7 as far as I can see.
Jan
Re: Assigning a fact to multiple individuals
Posted: 08 Jan 2022 21:36
by jmurphy
tatewise wrote: ↑23 Oct 2016 21:04
You misunderstand
Jim.
Helen wants to create one
Fact with its
Source Citation and then duplicate that
Fact in several
Individual records.
This is much the same as
AS does to create multiple
Census Events and is why
AS is so useful.
Helen wants to do something similar, but for a different
Fact that
AS does not handle.
BTW: Helen I have made a start on the Plugin.
I don't know what Helen had in mind, but for US passenger records, here's a link to blank forms for the various passenger lists and arrival records from Canada.
https://www.archives.gov/research/genea ... arts-forms
For the early 20th-century, there is not just one fact (arrival or departure), but many facts which might apply to the entire family. On the other hand, the relative in the home country and person going to meet in the US would have to be adjusted if one enters
all of the data in the list, since the relationship to childen is not going to be the same as to their parents.
TL;dr "It's complicated".
I wish I could program. I would love to produce something like Ancestral Sources that was made specifically for passenger lists, but it's far beyond my skills.
For census records, I use AS and then switch to FH for Auto-Source Citations for the other information found in US censuses which don't correspond to the basics.
My ideal program would allow us to re-create any forms we're copying from, then essentially we'd be filling out the form all over again, and posting the information into FH with the appropriate source citation running along with it.
Re: Assigning a fact to multiple individuals
Posted: 08 Jan 2022 21:40
by ColeValleyGirl
It's in my list of things to consider for a DEA, but very far down the list.
Re: Assigning a fact to multiple individuals
Posted: 08 Jan 2022 21:42
by jmurphy
Disclaimer: Due to computer woes, I still haven't installed FH7 or investigated the DEAs.
Re: Assigning a fact to multiple individuals
Posted: 09 Jan 2022 08:09
by dbnut
jimlad68 wrote: ↑24 Oct 2016 10:48
Ah well, worth a brain storm, learn something in the process, and I look forward to any other outcome/ solutions.
Like this, Jim?
The plug-in solutions (or some adaptation of the AS approach, which comes to the same thing) were/are/will be an admirable intervention by the best fire department in genealogy. Well done, heroes, I can't do that kind of thing!
May I propose the incident review back at base flags up this gap in "fire risk assessment"? There will be more incidents down the road [my puerile love of metaphors]
going forward (in time and not backwards) [and hatred of redundant buzz-phrases].
"Witnesses" can transform a life, just what the doctor ordered. But do you have to be satisfied with your current
uptick 
in mobility? Now insist on the latest remedy to help cast aside the walking stick!
What's that?
- Witness is a one-way link that could be souped up[1] to be two-way
- Witness detail is limited to Role & Note, properties that could be souped up to be typical of events[2]
And then?
- All witnessed facts, could be displayed in a person's All Properties tree[3].
- Witness detail, in both directions, would be accessible to standard queries & reports.
- A Witnesses Records Window could be provided (akin to Families) with record expansion.
Any side-effects?
- After a few days, much smoother user experience and improved efficiency.
- More free time for research.
- Brighter ring of confidence you made the right choice with Family Historian.
I have to believe, from the evidence so far[
4], that Calico Pie already envisages extensions of this sort. And how they prioritise and schedule such developments could be influenced by how much noise we make.
It's no shame to learn from the features offered by other software. And in my book Calico has made a great reputation

for doing some of those things better. And where's the best source of intelligence on what "immigrant users" miss? Their grumps in this forum

.
____________________
1. using 2-way pointers, as with FAMC (and as
could be done for Places).
2. with the usual options for default visibility, and permitting user-defined extension.
3. not just with the really neat dialogue via Facts tab.
4. including the Places records window, and decent Research Notes.
Re: Assigning a fact to multiple individuals
Posted: 09 Jan 2022 09:30
by ColeValleyGirl
dbnut wrote: ↑09 Jan 2022 08:09
And how they prioritise and schedule such developments could be influenced by how much noise we make.
Have you found your way to the Wish List yet, which is the 'official' place to make that noise?
Calico Pie - Wish List Policy (6175)
New Wish List Requests forum
The current Wish List
Re: Assigning a fact to multiple individuals
Posted: 09 Jan 2022 11:43
by dbnut
No, Helen
I'm more inclined to watch for reaction, take account of useful feedback, wait for any possible recommendations to go there and, lacking that, do so regardless only if I feel strongly enough. Which I might in the end this time.

Re: Assigning a fact to multiple individuals
Posted: 09 Jan 2022 11:59
by LornaCraig
I'm more inclined to watch for reaction, take account of useful feedback, wait for any possible recommendations to go there and, lacking that, do so regardless only if I feel strongly enough.
But you have already made your way to the Wish List Requests forum:
Citation Properties Dialogue (Filtering/Preferences) (20119)
I think you went straight to the forum for that, so I guess you must have felt very strongly.
