* Source Records Window, Chronological Date Sorting
Source Records Window, Chronological Date Sorting
In my Source Records window, I have a date column I would like to be able to sort chronologically. Is there a way to accomplish this?
Re: Source Records Window, Chronological Date Sorting
Just click on the column heading to sort into ascending order, and Alt- click for descending order.
This applies to most lists, including query resultsets.
This applies to most lists, including query resultsets.
Mike Loney
Website http://www.loney.tribalpages.com
http://www.mickloney.tribalpages.com
Website http://www.loney.tribalpages.com
http://www.mickloney.tribalpages.com
Re: Source Records Window, Chronological Date Sorting
Thank you Gowermick!
If I sort using the Column Header and with the dates in their "normal" format, they do not sort by chronological date because they are listed, for example, as April 19, 1895, which will sort by the Month, Day, Year. I would like them to sort by Year, Month, day, so they are listed chronologically.
If I sort using the Column Header and with the dates in their "normal" format, they do not sort by chronological date because they are listed, for example, as April 19, 1895, which will sort by the Month, Day, Year. I would like them to sort by Year, Month, day, so they are listed chronologically.
- tatewise
- Megastar
- Posts: 27083
- Joined: 25 May 2010 11:00
- Family Historian: V7
- Location: Torbay, Devon, UK
- Contact:
Re: Source Records Window, Chronological Date Sorting
Chris, is your date column actually a formal Date column or is it just a Text column that looks like a date?
Please, show us the Expression that defines the column contents.
Only Date fields will sort chronologically. Text fields will sort alphanumerically.
i.e. When you say it sorts by the Month, Day, Year does it sort in this order:
April
August
December
February
January
July
June
March
May
November
October
September
Please, show us the Expression that defines the column contents.
Only Date fields will sort chronologically. Text fields will sort alphanumerically.
i.e. When you say it sorts by the Month, Day, Year does it sort in this order:
April
August
December
February
January
July
June
March
May
November
October
September
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
Re: Source Records Window, Chronological Date Sorting
Here you go...
and yes, that is how it is sorting.
and yes, that is how it is sorting.
- Attachments
-
- Date.PNG (119.28 KiB) Viewed 1722 times
- tatewise
- Megastar
- Posts: 27083
- Joined: 25 May 2010 11:00
- Family Historian: V7
- Location: Torbay, Devon, UK
- Contact:
Re: Source Records Window, Chronological Date Sorting
Whoops
I must be mistaken. I was sure that Date fields would sort chronologically.
So one option is to use %SOUR.~DT-EVENT_DATE:ABBREV3% that uses the Short Date Format.
Then in Tools > Preferences > General tab set Preferred Short Date Format to yyyy/mm/dd or yyyy-mm-dd
However, it is still not always strictly chronological because the leading 0 on months and days 1 to 9 are omitted.
So the months Oct (10) to Dec (12) sort between Jan (1) and Feb (2).
The days 10-19 sort between 1 and 2, days 20-29 sort between 2 and 3, and 30-31 sort between 3 and 4.
Therefore, the only complete solution seems to need two columns:
%SOUR.~DT-EVENT_DATE%
=DayNumber(%SOUR.~DT-EVENT_DATE%) is the number of days since January 1st, 0001 AD
Sorting by the 2nd column will put the records in chronological order.
I wonder if the failure to sort Date field columns chronologically should be reported to CP.
So one option is to use %SOUR.~DT-EVENT_DATE:ABBREV3% that uses the Short Date Format.
Then in Tools > Preferences > General tab set Preferred Short Date Format to yyyy/mm/dd or yyyy-mm-dd
However, it is still not always strictly chronological because the leading 0 on months and days 1 to 9 are omitted.
So the months Oct (10) to Dec (12) sort between Jan (1) and Feb (2).
The days 10-19 sort between 1 and 2, days 20-29 sort between 2 and 3, and 30-31 sort between 3 and 4.
Therefore, the only complete solution seems to need two columns:
%SOUR.~DT-EVENT_DATE%
=DayNumber(%SOUR.~DT-EVENT_DATE%) is the number of days since January 1st, 0001 AD
Sorting by the 2nd column will put the records in chronological order.
I wonder if the failure to sort Date field columns chronologically should be reported to CP.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
Re: Source Records Window, Chronological Date Sorting
I could swear that I saw somewhere something about sorting dates - No, wait... It was a way to turn the date field so it would read for e.g. 1884/08/23, or something like that. Or maybe it was somebody wishing it would be that way??
I would think this would be an important option!
Oh well, I appreciate you trying. I will just move on to more important things...
Thanks Mike!
I would think this would be an important option!
Oh well, I appreciate you trying. I will just move on to more important things...
Thanks Mike!
Re: Source Records Window, Chronological Date Sorting
Mike,
That is unusual, I always thought it was a standard computing practise to store dates internally as integers, representing days from some inbuilt fixed date. These integers are then converted to the preferred date display option when required i.e US (MMDDYYY) versus UK (DDMMYYY) formats.
This problem doesn’t appear to occur when sorting facts by their dates in the property box, (at least, not that I’ve noticed)
That is unusual, I always thought it was a standard computing practise to store dates internally as integers, representing days from some inbuilt fixed date. These integers are then converted to the preferred date display option when required i.e US (MMDDYYY) versus UK (DDMMYYY) formats.
This problem doesn’t appear to occur when sorting facts by their dates in the property box, (at least, not that I’ve noticed)
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: 27083
- Joined: 25 May 2010 11:00
- Family Historian: V7
- Location: Torbay, Devon, UK
- Contact:
Re: Source Records Window, Chronological Date Sorting
There have been various suggestions about achieving yyyy/mm/dd format dates but they all suffer from the leading 0 problem for single-digit months and days.
As Mike suggests, on further investigation, I find standard FH/GEDCOM fields that are specified as Dates do automatically sort chronologically regardless of the display format, e.g. Fact Dates, Citation Entry Dates, etc.
I suspect FH uses the =DayNumber(...) function internally to perform the sorting.
The problem Chris has discovered only affects source template defined Date (DT) metafields.
I really do think it should be reported to CP, as I consider that is an oversight that should be fixed.
FH recognises such Date metafields because it allows Date qualifiers such as :ABBREV3.
So it is just the sorting that has not been implemented.
As Mike suggests, on further investigation, I find standard FH/GEDCOM fields that are specified as Dates do automatically sort chronologically regardless of the display format, e.g. Fact Dates, Citation Entry Dates, etc.
I suspect FH uses the =DayNumber(...) function internally to perform the sorting.
The problem Chris has discovered only affects source template defined Date (DT) metafields.
I really do think it should be reported to CP, as I consider that is an oversight that should be fixed.
FH recognises such Date metafields because it allows Date qualifiers such as :ABBREV3.
So it is just the sorting that has not been implemented.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
Re: Source Records Window, Chronological Date Sorting
Is this a new problem with FH7, or has this been an omission since FH's inception? It's hard to believe I am the first to run into this, but I did search everywhere and did not come up with any discussions of references.
What is the process to report problems to FH?
What is the process to report problems to FH?
- BillH
- Megastar
- Posts: 2184
- Joined: 31 May 2010 03:40
- Family Historian: V7
- Location: Washington State, USA
Re: Source Records Window, Chronological Date Sorting
Chris,
There is a link at the bottom of the support page on the FH website, https://www.family-historian.co.uk/supp ... t-overview.
Here is a direct link to the form for submitting issues, http://support.calico-pie.com/open.php.
Bill
There is a link at the bottom of the support page on the FH website, https://www.family-historian.co.uk/supp ... t-overview.
Here is a direct link to the form for submitting issues, http://support.calico-pie.com/open.php.
Bill
Re: Source Records Window, Chronological Date Sorting
Thank you Bill.
I will fill out the necessary report. Since this is my first time reporting something to CP, would it be a good idea, Mike, if you would also make a much more informed report of the problem?
I will fill out the necessary report. Since this is my first time reporting something to CP, would it be a good idea, Mike, if you would also make a much more informed report of the problem?
- BillH
- Megastar
- Posts: 2184
- Joined: 31 May 2010 03:40
- Family Historian: V7
- Location: Washington State, USA
Re: Source Records Window, Chronological Date Sorting
Chris,
You can refer to this post in your ticket which has more detail.
If you are not already aware you can click on the asterisk at the beginning of the title for this topic which will create a link and then you can cut and paste that link into your ticket.
Bill
You can refer to this post in your ticket which has more detail.
If you are not already aware you can click on the asterisk at the beginning of the title for this topic which will create a link and then you can cut and paste that link into your ticket.
Bill
Re: Source Records Window, Chronological Date Sorting
I created a support ticket stating the facts as per the conversation in this thread; asking for confirmation of the problem, and that they please consider fixing the problem now, or at least in the next release version.
I'll post what I find out.
I'll post what I find out.
- Mark1834
- Megastar
- Posts: 2147
- Joined: 27 Oct 2017 19:33
- Family Historian: V7
- Location: South Cheshire, UK
Re: Source Records Window, Chronological Date Sorting
There was a similar issue with Research Notes when they were first introduced (again, a new FH7 feature). The note date was processed as text, so sorted alphabetically rather than chronologically. That was fixed by changing the default Records Window column definition to =Date(GetLabelledText(%_RNOT.TEXT%, "Date:")), i.e. converting the free form text to a date field. That seems to cope well with the scenario of different notes having differently formatted dates so they sort correctly.
Mark Draper
- tatewise
- Megastar
- Posts: 27083
- Joined: 25 May 2010 11:00
- Family Historian: V7
- Location: Torbay, Devon, UK
- Contact:
Re: Source Records Window, Chronological Date Sorting
Mark, that problem was resolved by converting Text to a Date and FH then sorted accordingly.
This problem is different. FH already knows the metafield is a Date as it only allows Date Qualifiers like :YEAR, :ABBREV, etc.
The problem is that FH does NOT sort the column as a Date even though it knows it is a Date.
So =Date(%SOUR.~DT-EVENT_DATE%) doesn't help (I tried it) but I had an idea and tried converting the Date to Text and back again =Date( Text (%SOUR.~DT-DATE% ) ) and that seems to work
This problem is different. FH already knows the metafield is a Date as it only allows Date Qualifiers like :YEAR, :ABBREV, etc.
The problem is that FH does NOT sort the column as a Date even though it knows it is a Date.
So =Date(%SOUR.~DT-EVENT_DATE%) doesn't help (I tried it) but I had an idea and tried converting the Date to Text and back again =Date( Text (%SOUR.~DT-DATE% ) ) and that seems to work
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
Re: Source Records Window, Chronological Date Sorting
The wise owl comes through again!
Thank you Mike!
Now, in layman's terms, why did this happen? And not just to me, but to you also??
Thank you Mike!
Now, in layman's terms, why did this happen? And not just to me, but to you also??
- tatewise
- Megastar
- Posts: 27083
- Joined: 25 May 2010 11:00
- Family Historian: V7
- Location: Torbay, Devon, UK
- Contact:
Re: Source Records Window, Chronological Date Sorting
My solution is a workaround that just happens to work. It should not be necessary to use that trick.
The problem you reported to CP is still a fault that needs to be corrected, and I hope they agree.
The problem you reported to CP is still a fault that needs to be corrected, and I hope they agree.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
- Mark1834
- Megastar
- Posts: 2147
- Joined: 27 Oct 2017 19:33
- Family Historian: V7
- Location: South Cheshire, UK
Re: Source Records Window, Chronological Date Sorting
In layman's terms, it appears to be an internal communication error in FH - the template definition did not tell the records window that this field should be a date, so it was sorted in default alphabetical order. A lot of bugs in complex applications such as FH arise from incorrect internal communication.
Mark Draper
- tatewise
- Megastar
- Posts: 27083
- Joined: 25 May 2010 11:00
- Family Historian: V7
- Location: Torbay, Devon, UK
- Contact:
Re: Source Records Window, Chronological Date Sorting
Mark, that is what is so odd. The Records Window column Expression does know it is a Date and allows the Date Qualifiers.
Also, the column displays the Date using the Tools > Preferences > General tab Preferred Date Formats.
It is only the sorting process that has the 'incorrect internal communication' you describe.
Also, the column displays the Date using the Tools > Preferences > General tab Preferred Date Formats.
It is only the sorting process that has the 'incorrect internal communication' you describe.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry