Web based family history software

Question GEDCOM sort

  • klausthaler
  • Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
10 years 11 months ago #1 by klausthaler
GEDCOM sort was created by klausthaler
is there a simple tweak to change the sort order of items in webtrees GEDCOM exports from now (numbers presumably converted to text before sorting) 1,100,1000, .. 2,21, ..
to 1,2,3,4, .. (numbers sorted as numbers)?

Klaus

klausthaler.de/familie
webtrees 2.1, Apache/2.4 (Linux 3.10), PHP 8.2, MySQL 8.2

Please Log in or Create an account to join the conversation.

More
10 years 11 months ago #2 by fisharebest
Replied by fisharebest on topic GEDCOM sort
These are not numeric fields - they are text fields.

We cannot assume they will contain I1, I2, I3. They could contain

ABC
A1B2C3
1A2B3C

etc.

Greg Roach - greg@subaqua.co.uk - @fisharebest@phpc.social - fisharebest.webtrees.net

Please Log in or Create an account to join the conversation.

  • klausthaler
  • Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
10 years 11 months ago #3 by klausthaler
Replied by klausthaler on topic GEDCOM sort
too bad. But thanks anyway!

Klaus

klausthaler.de/familie
webtrees 2.1, Apache/2.4 (Linux 3.10), PHP 8.2, MySQL 8.2

Please Log in or Create an account to join the conversation.

  • ToyGuy
  • Offline
  • Moderator
  • Moderator
  • Live like it's Christmas every day - Santa Stephen
More
10 years 11 months ago #4 by ToyGuy
Replied by ToyGuy on topic GEDCOM sort

klausthaler wrote: too bad. But thanks anyway!

Klaus, why the too bad? Greg is telling you that these are not identifiers which have any purpose or meaning, other than mechanically to allow the internal references necessary to sustain the concept. Read several of the other posts about XREF and perhaps you'll understand. Eventually, these will not exist and its only by happenstance that, in webtrees, the numbers are generally small. They can be up to 24 alpha-numeric characters in length, and in any variation or combination, so 'ordering' them in any manner is not useful.

Santa Stephen the Fabled Santa
Latest webtrees at MyArnolds.com
Hosted by webtreesonline.com , a division of GeneHosts LLC
MacOS 10.6.8, Apache 2.2+, PHP 5.4.16, MySQL 5.5.28

Please Log in or Create an account to join the conversation.

  • klausthaler
  • Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
10 years 11 months ago #5 by klausthaler
Replied by klausthaler on topic GEDCOM sort
Stephen, you asked for it:

1. my Individuals, Families, Sources, Objects .. are numbered and have configurable prefixes "I","F","S","O", .. (see administration). I never change prefixes.
2. webtrees holds wt_next_id numbers in the database and if I create a new object I get one with the next free number concatenated to the prefix which is configured at that time. So part of these 'text' fields in fact is a text representation of a counter value.

No meaning?

In my case I there are no 'text's other than Prefix+number(1 .. next_id_number-1) and for many purposes I wanted them sorted by their numbers (as they were before importing them into webtrees). And presumably adding leading zeroes before import will help my case.

(And having been software developer for more than 30 years I learnt how implementations can bias views on things - never mind:-)

Klaus

klausthaler.de/familie
webtrees 2.1, Apache/2.4 (Linux 3.10), PHP 8.2, MySQL 8.2

Please Log in or Create an account to join the conversation.

  • norwegian_sardines
  • Offline
  • Platinum Member
  • Platinum Member
More
10 years 11 months ago #6 by norwegian_sardines
Replied by norwegian_sardines on topic GEDCOM sort
Klaus said:

No meaning?

In my case I there are no 'text's other than Prefix+number(1 .. next_id_number-1) and for many purposes I wanted them sorted by their numbers (as they were before importing them into webtrees). And presumably adding leading zeroes before import will help my case.

Yes you are correct "In Your Case", but this is not the case for everyone, and may not be the case for anyone in the near future.

You should read the large number of threads writen up in this blog about XREF values. You should also look into using the REFN as a User Defined Reference number. Again the REFN value has several threads in this blog.

Ken

Please Log in or Create an account to join the conversation.

  • ToyGuy
  • Offline
  • Moderator
  • Moderator
  • Live like it's Christmas every day - Santa Stephen
More
10 years 11 months ago #7 by ToyGuy
Replied by ToyGuy on topic GEDCOM sort
Klaus
As I suggested and has been adequately described by Ken, but daring to shout: THESE INTERNAL ID's HAVE NO MEANING.
They are not unique, they are not required to be added in any order or particular structure and they may well go away if the database is normalized. Just as the standard suggests, don't use them for identifiers as "they have no meaning".

Regardless of how you think they do or might, they don't. To establish a numbering system, God knows why, you must use the appropriate GEDCOM standard tag and devise a system and enter it yourself: REFN.

If you had read the rather abundant threads to which I referred, repeating this would not have been necessary. Good genealogical practices require you NOT use them, but of course, you are welcome to do as you like and ignore this advice and the standard.

Santa Stephen the Fabled Santa
Latest webtrees at MyArnolds.com
Hosted by webtreesonline.com , a division of GeneHosts LLC
MacOS 10.6.8, Apache 2.2+, PHP 5.4.16, MySQL 5.5.28

Please Log in or Create an account to join the conversation.

Powered by Kunena Forum
}