* Is there a way to stop/pause the CHANge time being updated.
- jimlad68
- Megastar
- Posts: 921
- 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.
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.
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
- tatewise
- Megastar
- Posts: 28347
- 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.
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.
Consider putting your recent Individual records in a Named LIst.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
- jimlad68
- Megastar
- Posts: 921
- 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.
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
- NickWalker
- Megastar
- Posts: 2597
- 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.
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.
Re: Is there a way to stop/pause the CHANge time being updated.
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
Mike Loney
Website http://www.loney.tribalpages.com
http://www.mickloney.tribalpages.com
Website http://www.loney.tribalpages.com
http://www.mickloney.tribalpages.com
- NickWalker
- Megastar
- Posts: 2597
- 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.
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.
- Mark1834
- Megastar
- Posts: 2458
- 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.
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
Re: Is there a way to stop/pause the CHANge time being updated.
Ah, my mistake.NickWalker wrote: ↑30 Jun 2022 06:52Not 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.
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
Mike Loney
Website http://www.loney.tribalpages.com
http://www.mickloney.tribalpages.com
Website http://www.loney.tribalpages.com
http://www.mickloney.tribalpages.com
- LornaCraig
- Megastar
- Posts: 3190
- 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.
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?NickWalker wrote: ↑29 Jun 2022 20:55 AS updates the CHAN date/time itself and does this on any records it updates.
They get a time stamp when they are geocded in FH but I don't always remember to do that immediately.
Lorna
- tatewise
- Megastar
- Posts: 28347
- 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.
OK, I admit I was being slightly economical with the truth regarding Plugins and AS
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.
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
- jimlad68
- Megastar
- Posts: 921
- 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.
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.
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
Re: Is there a way to stop/pause the CHANge time being updated.
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
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
Mike Loney
Website http://www.loney.tribalpages.com
http://www.mickloney.tribalpages.com
Website http://www.loney.tribalpages.com
http://www.mickloney.tribalpages.com
- NickWalker
- Megastar
- Posts: 2597
- 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.
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 homeLornaCraig wrote: ↑30 Jun 2022 09:23Nick, 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?NickWalker wrote: ↑29 Jun 2022 20:55 AS updates the CHAN date/time itself and does this on any records it updates.
They get a time stamp when they are geocded in FH but I don't always remember to do that immediately.
- Mark1834
- Megastar
- Posts: 2458
- 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.
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
- tatewise
- Megastar
- Posts: 28347
- 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.
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 )
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
Re: Is there a way to stop/pause the CHANge time being updated.
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.
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.
Mike Loney
Website http://www.loney.tribalpages.com
http://www.mickloney.tribalpages.com
Website http://www.loney.tribalpages.com
http://www.mickloney.tribalpages.com
- tatewise
- Megastar
- Posts: 28347
- 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.
That may be true, but a plugin that modifies a Project has plenty of scope for mishaps of all kinds
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
- NickWalker
- Megastar
- Posts: 2597
- 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.
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!
- Mark1834
- Megastar
- Posts: 2458
- 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.
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.
Granted it doesn’t record when they were first added, but that would need a new non-GEDCOM custom tag.
Mark Draper
Re: Is there a way to stop/pause the CHANge time being updated.
Mark,
Jim was a bit ambiguous in his quesstion. Did he mean most recently added individual, or most recently modified?
Over to you Jim
Jim was a bit ambiguous in his quesstion. Did he mean most recently added individual, or most recently modified?
Over to you Jim
Mike Loney
Website http://www.loney.tribalpages.com
http://www.mickloney.tribalpages.com
Website http://www.loney.tribalpages.com
http://www.mickloney.tribalpages.com
- tatewise
- Megastar
- Posts: 28347
- 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.
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.
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
- NickWalker
- Megastar
- Posts: 2597
- 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.
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.LornaCraig wrote: ↑30 Jun 2022 09:23Nick, 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?NickWalker wrote: ↑29 Jun 2022 20:55 AS updates the CHAN date/time itself and does this on any records it updates.
They get a time stamp when they are geocded in FH but I don't always remember to do that immediately.
- jimlad68
- Megastar
- Posts: 921
- 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.
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
- LornaCraig
- Megastar
- Posts: 3190
- 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.
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.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.
Lorna