Here is something that works for me.
The template:
Code:
python:
def evaluate(book, context):
db = context.db.new_api
items_with_notes = context.globals.get('items_with_notes')
if items_with_notes is None:
items_with_notes = db.get_all_items_that_have_notes('authors')
context.globals['items_with_notes'] = items_with_notes
for aut in book.authors:
if db.get_item_id('authors', aut) in items_with_notes:
return '1'
return ''
You set which category you are interested in by changing 'authors' to the category name of interest, e.g., tags.
The template search is:
EDIT: This template is slow.
See the template in post #10.