* Is there a way to stop/pause the CHANge time being updated.

Questions regarding use of any Version of Family Historian. Please ensure you have set your Version of Family Historian in your Profile
Post Reply
User avatar
jimlad68
Megastar
Posts: 804
Joined: 18 May 2014 21:01
Family Historian: V7
Location: Sheffield, Yorkshire, UK (but from Lancashire)
Contact:

Is there a way to stop/pause the CHANge time being updated.

Post by jimlad68 » 29 Jun 2022 19:51

I have noticed when I run some plugins (possibly all) that update a record, the individual shows an "Updated/CHAN" time.
This is what I would expect.
Is there a way to stop/pause this "blanket" CHANge. The reason being that it is often useful to view one's most recent individuals via the Records Window, which is left meaningless.

Not a major issue and I suspect it is well embedded in the FH code.
Jim Orrell - researching: see - but probably out of date https://gw.geneanet.org/jimlad68

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

Re: Is there a way to stop/pause the CHANge time being updated.

Post by tatewise » 29 Jun 2022 20:04

Any change to a record, whether by hand or by a command or via Query Result Set or via a Plugin or via AS, will force FH to change the Updated/CHAN date/time. Nothing can be done to stop that. Plugins cannot prevent it from happening.

Consider putting your recent Individual records in a Named LIst.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry

User avatar
jimlad68
Megastar
Posts: 804
Joined: 18 May 2014 21:01
Family Historian: V7
Location: Sheffield, Yorkshire, UK (but from Lancashire)
Contact:

Re: Is there a way to stop/pause the CHANge time being updated.

Post by jimlad68 » 29 Jun 2022 20:19

Mike, Thanks for the clarification; yes, I often use named lists for ongoing individuals, but it's easy to forget!
Jim Orrell - researching: see - but probably out of date https://gw.geneanet.org/jimlad68

User avatar
NickWalker
Megastar
Posts: 1734
Joined: 02 Jan 2004 17:39
Family Historian: V7
Location: Lancashire, UK
Contact:

Re: Is there a way to stop/pause the CHANge time being updated.

Post by NickWalker » 29 Jun 2022 20:55

tatewise wrote:
29 Jun 2022 20:04
Any change to a record, whether by hand or by a command or via Query Result Set or via a Plugin or via AS, will force FH to change the Updated/CHAN date/time. Nothing can be done to stop that. Plugins cannot prevent it from happening.
Pedantically (it makes no difference to your answer Mike which is otherwise correct), AS updates the CHAN date/time itself and does this on any records it updates. This is something I've had to specifically add to every place in my AS code which updates the records. If I didn't do this then the date wouldn't change and I don't think FH would know the records have changed so wouldn't update the date/time either.
Nick Walker
Ancestral Sources Developer

http://www.ancestralsources.com

avatar
Gowermick
Megastar
Posts: 1352
Joined: 13 Oct 2015 07:22
Family Historian: V7
Location: Swansea

Re: Is there a way to stop/pause the CHANge time being updated.

Post by Gowermick » 30 Jun 2022 06:08

Further to Nick’s reply, and contrary to Miketate’s reply, it would appear that one could therefore produce a plugin ( e.g. AS) that didn’t change the CHANge time/date, which is what Jim asked in the OP :D
Mike Loney

Website http://www.loney.tribalpages.com
http://www.mickloney.tribalpages.com

User avatar
NickWalker
Megastar
Posts: 1734
Joined: 02 Jan 2004 17:39
Family Historian: V7
Location: Lancashire, UK
Contact:

Re: Is there a way to stop/pause the CHANge time being updated.

Post by NickWalker » 30 Jun 2022 06:52

Gowermick wrote:
30 Jun 2022 06:08
Further to Nick’s reply, and contrary to Miketate’s reply, it would appear that one could therefore produce a plugin ( e.g. AS) that didn’t change the CHANge time/date, which is what Jim asked in the OP :D
Not really as AS isn't a plugin. AS is a standalone program and would theoretically work alongside any program that uses GEDCOM, it doesn't need FH to work. I had to develop 100s of routines in AS to process and manage the GEDCOM file, whereas FH plugins make use of all the FH inbuilt systems that do this. Those inbuilt systems used by FH plugins will deal with updating the change time/date for you.
Nick Walker
Ancestral Sources Developer

http://www.ancestralsources.com

avatar
Mark1834
Megastar
Posts: 1523
Joined: 27 Oct 2017 19:33
Family Historian: V7
Location: South Cheshire, UK

Re: Is there a way to stop/pause the CHANge time being updated.

Post by Mark1834 » 30 Jun 2022 07:44

I have a custom plugin that writes update stamps to file, then restores them by updating the GEDCOM file directly. It’s only for occasional use, such as adding UniqueID values, which updates all individuals and destroys the update history.
Mark Draper

avatar
Gowermick
Megastar
Posts: 1352
Joined: 13 Oct 2015 07:22
Family Historian: V7
Location: Swansea

Re: Is there a way to stop/pause the CHANge time being updated.

Post by Gowermick » 30 Jun 2022 08:52

NickWalker wrote:
30 Jun 2022 06:52
Gowermick wrote:
30 Jun 2022 06:08
Further to Nick’s reply, and contrary to Miketate’s reply, it would appear that one could therefore produce a plugin ( e.g. AS) that didn’t change the CHANge time/date, which is what Jim asked in the OP :D
Not really as AS isn't a plugin. AS is a standalone program and would theoretically work alongside any program that uses GEDCOM, it doesn't need FH to work. I had to develop 100s of routines in AS to process and manage the GEDCOM file, whereas FH plugins make use of all the FH inbuilt systems that do this. Those inbuilt systems used by FH plugins will deal with updating the change time/date for you.
Ah, my mistake.
So the real solution (if you could call it that) seems to be to apply any changes directly to the gedcom file, and not use FH at all, which sadly, is fraught with danger and too risky for most users!
Something to ponder :D
Mike Loney

Website http://www.loney.tribalpages.com
http://www.mickloney.tribalpages.com

User avatar
LornaCraig
Megastar
Posts: 2559
Joined: 11 Jan 2005 17:36
Family Historian: V7
Location: Oxfordshire, UK

Re: Is there a way to stop/pause the CHANge time being updated.

Post by LornaCraig » 30 Jun 2022 09:23

NickWalker wrote:
29 Jun 2022 20:55
AS updates the CHAN date/time itself and does this on any records it updates.
Nick, AS updates the date/time when it amends any existing records, and it also creates a date/time for newly created Individual and Source records. But it doesn't do this for newly created Place records. Did you intend it to?

They get a time stamp when they are geocded in FH but I don't always remember to do that immediately.
Lorna

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

Re: Is there a way to stop/pause the CHANge time being updated.

Post by tatewise » 30 Jun 2022 10:08

OK, I admit I was being slightly economical with the truth regarding Plugins and AS :o
It would be possible for a Plugin to capture all the Updated CHAN date/times by reading through the GEDCOM file.
Then after performing the desired changes, those captured values could be written back into the GEDCOM file.
That sounds like what Mark described.
However, I'm not proposing to add such a feature to any of my Plugins.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry

User avatar
jimlad68
Megastar
Posts: 804
Joined: 18 May 2014 21:01
Family Historian: V7
Location: Sheffield, Yorkshire, UK (but from Lancashire)
Contact:

Re: Is there a way to stop/pause the CHANge time being updated.

Post by jimlad68 » 30 Jun 2022 10:34

Thank you for all those answers/ ponderings. So it seems to me that to try to "fix" this minor annoyance may create more problems than it solves and possible Gedcom errors.
I suspect the only efficient/accurate way to do it would be if FH had an option to turn on/off CHANge updates.
Jim Orrell - researching: see - but probably out of date https://gw.geneanet.org/jimlad68

avatar
Gowermick
Megastar
Posts: 1352
Joined: 13 Oct 2015 07:22
Family Historian: V7
Location: Swansea

Re: Is there a way to stop/pause the CHANge time being updated.

Post by Gowermick » 30 Jun 2022 10:39

Mike, would such a routine(s) be a suitable option for a wishlist?
If CP could produce two such routines (save and restore), users could then include them safely at start and end of their plugin code, in order to preserve the CHAN entries, if needed! Just a thought :D
Mike Loney

Website http://www.loney.tribalpages.com
http://www.mickloney.tribalpages.com

User avatar
NickWalker
Megastar
Posts: 1734
Joined: 02 Jan 2004 17:39
Family Historian: V7
Location: Lancashire, UK
Contact:

Re: Is there a way to stop/pause the CHANge time being updated.

Post by NickWalker » 30 Jun 2022 10:41

LornaCraig wrote:
30 Jun 2022 09:23
NickWalker wrote:
29 Jun 2022 20:55
AS updates the CHAN date/time itself and does this on any records it updates.
Nick, AS updates the date/time when it amends any existing records, and it also creates a date/time for newly created Individual and Source records. But it doesn't do this for newly created Place records. Did you intend it to?

They get a time stamp when they are geocded in FH but I don't always remember to do that immediately.
Yes I think that wasn't my intention and is something AS ought to do. I need one line of programming code to update the modified date, but I do need to remember to add that line of code whenever it is required which I obviously didn't in this case. I'll try and remember to add this to my 'to do' list when I get home :)
Nick Walker
Ancestral Sources Developer

http://www.ancestralsources.com

avatar
Mark1834
Megastar
Posts: 1523
Joined: 27 Oct 2017 19:33
Family Historian: V7
Location: South Cheshire, UK

Re: Is there a way to stop/pause the CHANge time being updated.

Post by Mark1834 » 30 Jun 2022 10:50

IMO, deliberately altering or suppressing the update record is not something that should be done lightly, so should not be a program option.
Mark Draper

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

Re: Is there a way to stop/pause the CHANge time being updated.

Post by tatewise » 30 Jun 2022 11:04

Mike Loney, nothing quite so sophisticated is needed for Plugins.
All that is required is the ability to access the "CHAN" data tag just like every other data tag.
i.e.
ptrIndi = fhNewItemPtr()
ptrIndi:MoveToFirstRecord( "INDI" )
ptrChan = fhGetItemPtr( ptrIndi, "~.CHAN" )
ptrDate = fhGetItemPtr( ptrIndi, "~.CHAN.DATE" )
ptrTime = fhGetItemPtr( ptrIndi, "~.CHAN.DATE.TIME" )
isTrue = fhIsValidDataRef( "INDI.CHAN.DATE.TIME" )

Currently, none of those data tags are supported, except the last statement says it is a valid Data Ref :!:

If those tags were accessible, the Plugin could read & write the Date/Time values as required by the Plugin user.

BTW: There is the =LastUpdated(...) function that returns the Updated Date/Time of any record, so that is part way towards a solution. The documentation does not mention the hour & minute returned values available to Plugins:
datDate, intHour, intMin = fhCallBuiltInFunction( "LastUpdated", ptrIndi )
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry

avatar
Gowermick
Megastar
Posts: 1352
Joined: 13 Oct 2015 07:22
Family Historian: V7
Location: Swansea

Re: Is there a way to stop/pause the CHANge time being updated.

Post by Gowermick » 30 Jun 2022 13:34

Mike,
I hear what you say, but giving direct access to the CHAN data tag could be problematical should things go wrong. My thinking is if the tags could be saved and restored only via dedicated functions, there would be no chance of mishaps.
Also, once the functions existed, there would be no need for users to keep re-inventing the same wheel. :D
Mike Loney

Website http://www.loney.tribalpages.com
http://www.mickloney.tribalpages.com

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

Re: Is there a way to stop/pause the CHANge time being updated.

Post by tatewise » 30 Jun 2022 14:01

That may be true, but a plugin that modifies a Project has plenty of scope for mishaps of all kinds :D
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry

User avatar
NickWalker
Megastar
Posts: 1734
Joined: 02 Jan 2004 17:39
Family Historian: V7
Location: Lancashire, UK
Contact:

Re: Is there a way to stop/pause the CHANge time being updated.

Post by NickWalker » 30 Jun 2022 15:35

tatewise wrote:
30 Jun 2022 14:01
That may be true, but a plugin that modifies a Project has plenty of scope for mishaps of all kinds :D
I tend to agree. People seem to happily run plugins that make all sorts of changes to their data. A plugin that changes an updated date seems a very minor concern in comparison!
Nick Walker
Ancestral Sources Developer

http://www.ancestralsources.com

avatar
Mark1834
Megastar
Posts: 1523
Joined: 27 Oct 2017 19:33
Family Historian: V7
Location: South Cheshire, UK

Re: Is there a way to stop/pause the CHANge time being updated.

Post by Mark1834 » 30 Jun 2022 16:10

I think we have all got a bit distracted into discussing the means rather than the end. Jim’s desired outcome was to essentially view records by date added. Just sorting the Records Window by Record Number does this, as FH always adds records to the end of the list and does not reuse deleted numbers (unless you force a renumbering of your records, which is not advisable).

Granted it doesn’t record when they were first added, but that would need a new non-GEDCOM custom tag.
Mark Draper

avatar
Gowermick
Megastar
Posts: 1352
Joined: 13 Oct 2015 07:22
Family Historian: V7
Location: Swansea

Re: Is there a way to stop/pause the CHANge time being updated.

Post by Gowermick » 30 Jun 2022 16:53

Mark,
Jim was a bit ambiguous in his quesstion. Did he mean most recently added individual, or most recently modified?
Over to you Jim :D
Mike Loney

Website http://www.loney.tribalpages.com
http://www.mickloney.tribalpages.com

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

Re: Is there a way to stop/pause the CHANge time being updated.

Post by tatewise » 30 Jun 2022 17:05

He agreed that using a Named List was a tactic he often used, so I suspect the latter.
It would not be needed for the former as Mark explained by using Record Id.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry

User avatar
NickWalker
Megastar
Posts: 1734
Joined: 02 Jan 2004 17:39
Family Historian: V7
Location: Lancashire, UK
Contact:

Re: Is there a way to stop/pause the CHANge time being updated.

Post by NickWalker » 30 Jun 2022 17:51

LornaCraig wrote:
30 Jun 2022 09:23
NickWalker wrote:
29 Jun 2022 20:55
AS updates the CHAN date/time itself and does this on any records it updates.
Nick, AS updates the date/time when it amends any existing records, and it also creates a date/time for newly created Individual and Source records. But it doesn't do this for newly created Place records. Did you intend it to?

They get a time stamp when they are geocded in FH but I don't always remember to do that immediately.
Sorry, that this is now making the thread rather complicated as different issues are being discussed, but I've now remembered that actually AS doesn't create any place records at all. I didn't see the need to do this as FH automatically creates place records if it comes cross places in any facts that aren't already recorded and AS has no information to store in the place record. Place records were added in a later version of FH and I didn't see the need to use them. It looks like FH just creates these place records but doesn't put a change date in them. I wonder if that's a mistake or deliberate.
Nick Walker
Ancestral Sources Developer

http://www.ancestralsources.com

User avatar
jimlad68
Megastar
Posts: 804
Joined: 18 May 2014 21:01
Family Historian: V7
Location: Sheffield, Yorkshire, UK (but from Lancashire)
Contact:

Re: Is there a way to stop/pause the CHANge time being updated.

Post by jimlad68 » 30 Jun 2022 18:38

Gowermick wrote:
30 Jun 2022 16:53
Jim was a bit ambiguous in his quesstion. Did he mean most recently added individual, or most recently modified?
Over to you Jim :D
Very much most recently modified. However, sorting by Record ID may work as a fallback in many situations, especially when entering new branches.

So thanks again, I have 2 partial workarounds.
Jim Orrell - researching: see - but probably out of date https://gw.geneanet.org/jimlad68

User avatar
LornaCraig
Megastar
Posts: 2559
Joined: 11 Jan 2005 17:36
Family Historian: V7
Location: Oxfordshire, UK

Re: Is there a way to stop/pause the CHANge time being updated.

Post by LornaCraig » 30 Jun 2022 18:45

NickWalker wrote:
30 Jun 2022 17:51
Sorry, that this is now making the thread rather complicated as different issues are being discussed, but I've now remembered that actually AS doesn't create any place records at all. I didn't see the need to do this as FH automatically creates place records if it comes cross places in any facts that aren't already recorded and AS has no information to store in the place record. Place records were added in a later version of FH and I didn't see the need to use them. It looks like FH just creates these place records but doesn't put a change date in them. I wonder if that's a mistake or deliberate.
Thanks Nick, that's interesting. It does seem odd that in these circumstances FH creates the Place records without any change date. However it's not really a problem.
Lorna

Post Reply