Page 1 of 1

FACT QUERY, Last updated

Posted: 17 May 2016 14:12
by jimlad68
I'm trying to get the last updated date/time for a fact within a FACT query with =LastUpdated() but it gives no return. Looking at the Gedcom file it looks as if only the last update date/time is for the whole individual, not their separate FACTs. However, in order for FH to UNDO, there must be at least some sort of temporary date/time stamp?

So I tried to get the last updated date/time for the owner of the fact with =LastUpdated(%INDI%), but that gives invalid expression for the query type.

I've looked through the standard queries and the =LastUpdated examples only refer to FAM, NOTE, OBJE, INDI

The only workarounds I can think of are:
1 - INDIvidual query with a column for the FACT I am interested in, I can then sort that by FACT reverse then by standard INDI LAST UPDATED reversed.
2 - INDIvidual query with a ROW and if %INDI.EVEN-factname[1]% contains blank and sort on LAST UPDATED reversed.

So, does anyone know of a way to add any useful kind of last updated date/time to a fact query.

Re: FACT QUERY, Last updated

Posted: 17 May 2016 15:57
by Jane
As you suspected last updated is only available at Record level not fact level.

To get the record last updated use

Code: Select all

=LastUpdated(FactOwner(%FACT%,1,MALES_FIRST))

Re: FACT QUERY, Last updated

Posted: 17 May 2016 20:05
by tatewise
=LastUpdated(GetRecord(%FACT%)) is an alternative that works better for both Individual and Family Facts.

Re: FACT QUERY, Last updated

Posted: 17 May 2016 21:28
by jimlad68
Thanks Jane, Mike.

For my purposes both those work a treat, except it is:
=LastUpdated(FactOwner(%FACT%,1,MALES_FIRST)) gives ALL marriage facts a last updated date
where
=LastUpdated(GetRecord(%FACT%)) shows a last updated date for about 2/3 of my marriage facts. (Could this be because I have never updated them since my Gedcom import?)

I think both give all the non marriage dates are the same, but of those marriage dates that are shown in the GetRecord(%FACT% , a large majority are the same, but a large minority are not.

Interesting!

Anyway it does the job I wanted. I then added extra columns of:
%FACT.NOTE2[1]% and
=GetParagraph(%FACT.NOTE2%,2)
so I can see if a note has more than 1 paragraph and can then filter that easily with a ROW selection of:
And if > =FactLabel(%FACT%) > contains > whatever

Re: FACT QUERY, Last updated

Posted: 17 May 2016 21:52
by tatewise
Both alternatives give the same Individual Record for Individual Facts.
But the two alternatives differ for Family Facts such as Marriage.
Jane's gives the Male Individual Record associated with the Family of a Marriage Event, and the last updated date for that Individual may be totally unrelated to the Marriage Event.
Mine gives the Family Record of the Marriage Event and should give the appropriated last updated date.
Yes, a blank date may well be because the Family Record has not been updated since import, because many products do not support the optional Gedcom tag for last updated.
Check the Records Window on the Families tab and review the Updated column, or run the Last Updated Family Records Query.