Numeric sorting of IDs?

Hello! I’ve recently started working with a GEDCOM file from my grandfather, who passed away 10+ years ago. Unfortunately he messed something up so all records are in triplicate.

I’ve done some testing and I can simply delete the records with an ID larger than 12000. However, when I sort by ID in the “People” view, they’re sorted alphabetically rather than numerically - which means that “3571” comes between 35709 and 35710.

Any ideas?

Correct the ID is only a text field.

Any ideas?

Not sure if will help but have you looked at Tools->Family Tree Processing->Reorder Gramps IDs… to prefix those GEDCOM id’s?

Make your IDs in preferences as %05d then import your database in a new one.

1 Like

There is also the Reorder Gramps ID tool. It will allow you to add/pad the number of leading zeros to an ID number.

In this scenario, do NOT use the Change option. Change would resequence the IDs altering existing numbers. Without the Change option, leading zeros are added to existing numbers so all IDs will have the same length.

The Reorder tool allows you to change selected portions of the database.

As with any batch edit tools, make sure to have a backup of the database before processing.

1 Like

Thanks guys! I appreciate it a lot :slight_smile:

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.