Using Attributes for searchable IDs

On Facebook, user @ChabotEric posted about maintaining an Excel spreadsheet as a cross-reference between Gramps IDs and those in his other software.

It seemed like that would be easier to maintain in Gramps as Attribute values. If Excel is needed for analysis or script building, it is easy enough to output a CSV of the Gramps ID and the Attribute value from SuperTool.

@kku was kind enough to create a SuperTool script that filters on an Attribute type and/or value. And it can be loaded in any category and saved as a Custom Filter.

Kari also enhanced SuperTool so that the getargs feature can be used in a Custom Filter. This allows different parameters to be used for each run of the filter. (It remembers the last values to make it easy to run again with the same settings.)

A new SuperTool 1.6.2 addon update is available from the Isotammi curated collection via Addon Manager.

Save the following as either a Note of SuperTool Script type or as a .script file:

[Gramps SuperTool script file]
version=1

[title]
filter-by-attribute

[description]
Filter Attribute by type and/or value (can be saved as a filter)
   Kari Kujansuu 2026
discussed in:
https://gramps.discourse.group/t/using-attributes-for-ids/9004

[category]
People

[initial_statements]
args = getargs(attrname="Attribute name", attrvalue="Attribute value")
attrname = args.attrname.strip()
attrvalue = args.attrvalue.strip()

def match(obj, attrname, attrvalue):
	if (attrname, attrvalue) in obj.attributes:
		return True
	if attrname == "":
		for (name, value) in obj.attributes:
			if attrvalue == value: return True
	if attrvalue == "":
		for (name, value) in obj.attributes:
			if attrname == name : return True
	return False

[statements]

[filter]
match(self, attrname, attrvalue)

[expressions]
name, attributes

[scope]
all

[unwind_lists]
False

[commit_changes]
False

[summary_only]
False

one of the benefits of running the filter in SuperTool is that results in the People view do not display the actual Attribute values. But the results in SuperTool can show any records you like:

OK until one day you realise you have 10,000 people in your database and
your next available ID is 15,001 so you use the Reorder Function.
The attribute is a good idea as long as the other software does not
allow re-numbering functionality.
phil

The real likelihood is that Gramps will start supporting storing identifiers for external databases in a structured record instead of Attributes. Such as import of the UID, EXID (with a URI) and REFN of the GEDCOM7. Or the AFN, RFN and RIN of GEDCOM551.

Then we’ll have to convert the attribute to a different record type.

The WebSearch add-on gramplet by @urchello already supports storing external IDs with Attributes. But you need to be able to search… both for particular ID values and for particular built-in and custom types.

Attribute name Website Description Example value
_FSFTID FamilySearch.org person profile KNDX-MKG
FacebookID Facebook.com account groups/370692133138445
FindAGraveID FindAGrave.com memorial profile 1075
GeneeeID Geneee.org (Geneweb) person profile george/washington
GeniID Geni.com person profile George-Washington-1st-President-of-the-United-States/6000000008211776777
GNDID d-nb.info Dun & Bradstreet business profile 54-0564701 (Mount Vernon Ladies’ Association of the Union)
InstagramID Instagram.com account @mount_vernon
LinkedInID LinkedIn.com person professional profile mountvernon
RogloID Roglo.eu (Rauglaudre collaborative GeneWeb database) person profile 1825727
VIAFID viaf.org (Virtual International Authority File) OCLC identifier 31432428
WeRelateID WeRelate.org person profile George_Washington_(6)
WikidataID Wikidata.org knowledgebase article name Q23
WikipediaID wikipedia.org knowledgebase article name George_Washington
WikiTreeID WikiTree.com person profile Washington-11
XINGID XING.com job listing

The TypeCleanup addon tool will let you search for the existence of Custom types… but not built-in types.