* Including update date in reports

Questions regarding use of any Version of Family Historian. Please ensure you have set your Version of Family Historian in your Profile. If your question fits in one of these subject-specific sub-forums, please ask it there.
Post Reply
User avatar
Mark1834
Megastar
Posts: 2538
Joined: 27 Oct 2017 19:33
Family Historian: V7
Location: South Cheshire, UK

Including update date in reports

Post by Mark1834 »

Is it possible to include the date an individual record was last updated in a Individual Summary or Family Group Report? It’s a useful indication of whether it’s somebody I’ve worked on recently, or not touched in months.

I couldn’t see it in the standard list of data references, and various experiments with INDI.LastUpdated() didn’t work. I can see a potential workaround if not (custom attribute written directly to GEDCOM file to avoid updating the very parameter I’m trying to extract) but hopefully I’ve just not created the reference correctly.
Mark Draper
User avatar
LornaCraig
Megastar
Posts: 3224
Joined: 11 Jan 2005 17:36
Family Historian: V7
Location: Oxfordshire, UK

Re: Including update date in reports

Post by LornaCraig »

In an individual summary report I have just tried using Options>Format and under the Heading section , Record line, edited it to add =LastUpdated() after the name and life dates. Seems to work.
Lorna
User avatar
tatewise
Megastar
Posts: 28496
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: Including update date in reports

Post by tatewise »

Tip: If you cannot find a Data Reference for what you want, try the Functions list.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
User avatar
Mark1834
Megastar
Posts: 2538
Joined: 27 Oct 2017 19:33
Family Historian: V7
Location: South Cheshire, UK

Re: Including update date in reports

Post by Mark1834 »

Thanks folks, simple when you know how :). I took the hint from Lorna's suggestion and just used =LastUpdated() as the data reference, and it works fine for individual data (Family Group and Individual Summary).

It displays as dd/mm/yyyy, which I don't like because of its ambiguity, but I'll play with options to see if I can convert it to the same format as event dates (dd mmm yyyy).
Mark Draper
User avatar
tatewise
Megastar
Posts: 28496
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: Including update date in reports

Post by tatewise »

FYI: =LastUpdated() is not a Data Reference but is a Function
Those two entities are what make up Expressions.
There is advice in the FHUG KB on Understanding ... those three.

I don't think it possible to reformat the Date & Time format of =LastUpdated() from its dd/mm/yyyy hh:mm
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
User avatar
Jane
Site Admin
Posts: 8522
Joined: 01 Nov 2002 15:00
Family Historian: V7
Location: Somerset, England
Contact:

Re: Including update date in reports

Post by Jane »

I believe the LastUpdated field returns the datetime in the format set as the Short Date Format for Windows. So unfortunately it's limited.

You can however do

Code: Select all

=Date(LastUpdated())
To extract the date from the datetime variable, as long as you don't need the hours and minutes.
Jane
My Family History : My Photography "Knowledge is knowing that a tomato is a fruit. Wisdom is not putting it in a fruit salad."
User avatar
Mark1834
Megastar
Posts: 2538
Joined: 27 Oct 2017 19:33
Family Historian: V7
Location: South Cheshire, UK

Re: Including update date in reports

Post by Mark1834 »

Another related issue - I can format the page header of a Family Group Sheet report to "Family Group Sheet ...of John Smith and Mary Jones" using "=Title() =Record()" in report options, but it's a bit untidy. It's easy enough to correct in Word before I convert to PDF, but is there a way of suppressing the unnecessary "...of" reported by Record() please?
Mark Draper
User avatar
tatewise
Megastar
Posts: 28496
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: Including update date in reports

Post by tatewise »

I suspect the RightText(...) function will do that. e.g. =RightText( Record(), 4 )
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
User avatar
Mark1834
Megastar
Posts: 2538
Joined: 27 Oct 2017 19:33
Family Historian: V7
Location: South Cheshire, UK

Re: Including update date in reports

Post by Mark1834 »

Thanks - missed that, as RightText() is an FH7 feature, and the functions section on the KB that you referred me to earlier in the thread hasn't been updated for the new version yet.
Mark Draper
User avatar
tatewise
Megastar
Posts: 28496
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: Including update date in reports

Post by tatewise »

I presume you are referring to the Understanding Functions cross-reference to the FH V6 Help at https://www.family-historian.co.uk/help ... tions.html which has been kindly supplied by CP.
I have no idea if that will get updated to the FH V7 Help pages.
So in these circumstances always double-check the Help pages in FH V7 itself.

Tip: In the Help there is a Favourites tab in which I Add shortcuts to such as Functiuns (all)
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
User avatar
Mark1834
Megastar
Posts: 2538
Joined: 27 Oct 2017 19:33
Family Historian: V7
Location: South Cheshire, UK

Re: Including update date in reports

Post by Mark1834 »

Mark Draper
User avatar
tatewise
Megastar
Posts: 28496
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: Including update date in reports

Post by tatewise »

Ok, so it is just a matter of time to reference them from all the KB pages.
As a matter of interest, will the FH V6 Help page references from KB be retained alongside the new references for FH V7 Help pages where the Help is significantly different?
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
User avatar
ColeValleyGirl
Megastar
Posts: 5525
Joined: 28 Dec 2005 22:02
Family Historian: V7
Location: Cirencester, Gloucestershire
Contact:

Re: Including update date in reports

Post by ColeValleyGirl »

tatewise wrote: 30 Jan 2021 17:55 Ok, so it is just a matter of time to reference them from all the KB pages.
As a matter of interest, will the FH V6 Help page references from KB be retained alongside the new references for FH V7 Help pages where the Help is significantly different?
We'll retain separate links to both the HF6 help file and the FH7 help file (and both will be included when you search the KB).
User avatar
Mark1834
Megastar
Posts: 2538
Joined: 27 Oct 2017 19:33
Family Historian: V7
Location: South Cheshire, UK

Re: Including update date in reports

Post by Mark1834 »

Updated for the benefit of anybody searching this thread in the future - FH functions do not work in report headers and footers. They only accept literal text or the four "special values", =Page(), =Date(), =Title(), and =Record(). The only customisation appears to be the date format, which follows the format specified for Preferred Standard Date Format in FH Preferences for the benefit of our USA friends who write dates backwards ;).

I have also confirmed by experiment that =LastUpdated() returns the short date format specified in Windows settings, which are all numeric. I think the least ambiguous version is the ISO 8601 option of yyyy-mm-dd (e.g. 2021-01-31 for today), so I have changed my Windows settings to use that throughout.
Mark Draper
avatar
TimTreeby
Famous
Posts: 170
Joined: 12 Sep 2003 14:56
Family Historian: V6.2
Location: Ogwell, Devon
Contact:

Re: Including update date in reports

Post by TimTreeby »

With a bit of experiment can get to last update to show as may be required without changing Windows Settings.

LastUpdateDate.PNG
LastUpdateDate.PNG (12.23 KiB) Viewed 4416 times

LastUpdated uses : =DateAt(Year(LastUpdated()),Month(LastUpdated()),Day(LastUpdated()))
LastUpdated1 uses : =LastUpdated()
User avatar
tatewise
Megastar
Posts: 28496
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: Including update date in reports

Post by tatewise »

Even that is over complicating things. No Windows adjustment is necessary.
As Jane said last week, simply use =Date(LastUpdated()) to display in dd mmm yyyy format.

That uses the Tools > Preferences > General tab Preferred Standard Date Format which can also be mmm dd, yyyy
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
User avatar
Mark1834
Megastar
Posts: 2538
Joined: 27 Oct 2017 19:33
Family Historian: V7
Location: South Cheshire, UK

Re: Including update date in reports

Post by Mark1834 »

Even better! Now that I have prepared a couple of reports, I think I actually prefer yyyy-mm-dd for displaying update information. It is unambiguous (for me anyway, as yyyy-dd-mm is really weird) and clearly stands out as distinctive and not confused with a fact date on skim reading.
Mark Draper
User avatar
tatewise
Megastar
Posts: 28496
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: Including update date in reports

Post by tatewise »

I don't recall anybody suggesting yyyy-dd-mm which as you say is weird.

It is possible to produce yyyy-mm-dd using FH functions without resorting to adjusting Windows settings:

=Year(LastUpdated())-=TextIf(Month(LastUpdated())<10,"0")=Month(LastUpdated())-=TextIf(Day(LastUpdated())<10,"0")=Day(LastUpdated())

It is unfortunate that the =TextIf( ... <10,"0") are needed to add a leading zero for single digit months or days.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
User avatar
sbell95
Famous
Posts: 154
Joined: 14 Feb 2021 06:04
Family Historian: V7
Location: Australia

Re: Including update date in reports

Post by sbell95 »

I have been trying to implement YYYY-MM-DD dates in my Record Title Format source template field so that I can sort chronologically by editions of a newspaper.

The following code works:

Code: Select all

{=Year(%SOUR.~DT-ISSUE_DATE%)}-{=Month(%SOUR.~DT-ISSUE_DATE%)}-{=Day(%SOUR.~DT-ISSUE_DATE%)}
But when I try and introduce the =TextIf function to include leading zeroes where appropriate, the source template editor tells me that it's an invalid expression:

Code: Select all

{=Year(%SOUR.~DT-ISSUE_DATE%)}-{=TextIf(Month(%SOUR.~DT-ISSUE_DATE%)<10,"0")=Month(%SOUR.~DT-ISSUE_DATE%)}-{=TextIf(Day(%SOUR.~DT-ISSUE_DATE%)<10,"0")=Day(%SOUR.~DT-ISSUE_DATE%)}
Any ideas what I'm doing wrong here?
Sarah Bell – Australia
User avatar
tatewise
Megastar
Posts: 28496
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: Including update date in reports

Post by tatewise »

The explanation is that in many contexts functions can be placed next to each other.
But in Templates that need { brackets } around functions then every outermost function needs those { brackets }.
i.e. Wherever there is =Function(...) there must be {=Funcion(...)}
e.g.
{=TextIf(Month(%SOUR.~DT-ISSUE_DATE%)<10,"0")=Month(%SOUR.~DT-ISSUE_DATE%)}
needs to be
{=TextIf(Month(%SOUR.~DT-ISSUE_DATE%)<10,"0")}{=Month(%SOUR.~DT-ISSUE_DATE%)}

and similarly for the Day portion.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
User avatar
Mark1834
Megastar
Posts: 2538
Joined: 27 Oct 2017 19:33
Family Historian: V7
Location: South Cheshire, UK

Re: Including update date in reports

Post by Mark1834 »

As an aside to reporting a minor bug with date formatting in a different context, I asked CP about supporting this ISO 8601 date format within FH, as it is the international standard for text representation of date in computer systems, and the only common format that sorts chronologically as text.

They didn’t seem that enthusiastic, so it looks like we’re stuck with jumping through these hoops for the foreseeable future.
Mark Draper
User avatar
jimlad68
Megastar
Posts: 924
Joined: 18 May 2014 21:01
Family Historian: V7
Location: Sheffield, Yorkshire, UK (but from Lancashire)
Contact:

Re: Including update date in reports

Post by jimlad68 »

Mark1834 wrote: 11 Mar 2023 11:53 .... supporting this ISO 8601 date format within FH, as it is the international standard for text representation of date in computer systems, and the only common format that sorts chronologically as text.
Wholeheartedly agree "sorting out of the box" and have used and pushed this for decades in my IT work. Also why I use PLACe order biggest first (e.g. country, state, city etc). It's a pity "the authorities" and probably the USA in particular don't use the ISO standards more. In the UK we are still not completely metric, and when I visit the USA it's like going back 70 years to my childhood!
Jim Orrell - researching: see - but probably out of date https://gw.geneanet.org/jimlad68
Post Reply