Filter by Note Type

Gramps 5.1.3, macOS Catalina 10.15.6.

Is it possible to create a filter for items linked to notes of a specific type (General, Citation, etc.)?

There is a Note filter that allows filtering by Type. And of course the Notes sidebar Filter allows filtering by Type.

Notes matching parameters

But it appears that none of the other areas of Gramps allow using any filter created in Notes as a sub-filter. The other areas allow filters based upon the number of attached notes or by searching for a string of text found in attached notes.

When a creating a note for another object, Gramps sets a default type. “Person Note”, “Event Note”, “Source Note”, etc. Unless you override these Types, most notes will have the same set of Types. A search for People with the note Type “Person Note” would return a lot of records.

Searching in Notes by Type will give you the Notes you want. The References tab will show you what these notes are linked to.

Is there something specific you are looking for? Maybe another user will have a way to find what what you seek coming at it from another angle.

In this case, I was looking for all citations that do not have a “transcript” note. (My expectation was if I could create a filter for all records that have a specific note type, I would also be able to create the corresponding ‘not’ filter.). I have discovered that transcribing records can expose details I missed when I just read the record.

I often change the note types to be consistent with my methodology. For instance I use citation notes to only record a full citation to my standards.

1 Like

The default note Type for citations is “Citation”. So if there are any citation notes that you did not set to “Transcript”, a good bet they are typed “Citation”.

You can filter Citations with a note count > 0. The Note tab on the Bottombar displays the note but not the Type. A quick edit of the citation will display the note with the Type.

Sorry, but I do not see an easy solution.


Going forward, if you want the default to be “Transcript”, you can make a simple hack of the code to change the default.

In the program files will be gramps\gui\editors\editcitation.py
It is a text file but be careful not to alter indents.

Search for notetype=NoteType.CITATION
Replace CITATION with TRANSCRIPT

The folder will probably be protected (it is on Win10) so you would need to run the editor with administrator rights.

And of course, when you install the next version of Gramps, you will need to make the same hack again. I keep a Modification folder with the same sub folder structure with any hack I have made. I keep a copy of my changed file with #DES_MOD at the end of the line of changed code. In the above example it would be notetype=NoteType.TRANSCRIPT) #DES_MOD The # makes what follows a comment and DES_MOD is my initials_modification so I can find them again.

Thanks. I’ll submit a bug report for an enhancement–if I can get Mantis to allow me to create an account. Sigh.

I have a list of changes that I keep in a file called GrampsHacks. I’ll consider making this one if changing the type becomes to much of a bother. But I’d rather keep the list of hacks to a minimum.

Another alternative: you could use tags to more easily filter your citations. (I was going to suggest using attributes on the citations, but I don’t see a way to filter on those, whereas there is a filter rule for “Citations with the <tag>”.) It’s a bit redundant, but you could for example tag a citation as “Transcribed” once you’ve created the transcript note, and similarly use other tags representing other aspects of your workflow.

That’s a possibility. I could go back and scan every citation to see if it had a transcript note. At least it is fail safe. If I forget to tag a citation after transcribing, it will be untagged, indicating I still need to transcribe it.

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