| 
			
			 | 
		#1021 | 
| 
			
			
			
			 Wizard 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,292 
				Karma: 1428263 
				Join Date: Dec 2016 
				Location: Goiânia - Brazil 
				
				
				Device: iPad, Kindle Paperwhite, Kindle Oasis 
				
				
				 | 
	
	
	
		
		
		
		
		 
			
			Hi, @chaley. 
		
	
		
		
		
		
		
		
		
		
		
		
	
	The has_note(field_name, field_value) function can find all the books that have a note for 'field_name' which value is 'field_value'. Would it be possible to update the function so we can find books that have notes, no matter their value? Maybe setting 'field_value' to '', '*' or something like that.  | 
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#1022 | |
| 
			
			
			
			 Grand Sorcerer 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,525 
				Karma: 8065948 
				Join Date: Jan 2010 
				Location: Notts, England 
				
				
				Device: Kobo Libra 2 
				
				
				 | 
	
	
	
		
		
		
		
		 Quote: 
	
 Note that field_value is for example the tag, author, or series name, not the contents of the note attached to the field.  | 
|
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#1023 | |
| 
			
			
			
			 Wizard 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,292 
				Karma: 1428263 
				Join Date: Dec 2016 
				Location: Goiânia - Brazil 
				
				
				Device: iPad, Kindle Paperwhite, Kindle Oasis 
				
				
				 | 
	
	
	
		
		
		
		
		 Quote: 
	
  | 
|
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#1024 | |
| 
			
			
			
			 Guru 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 922 
				Karma: 810834 
				Join Date: Sep 2017 
				Location: Buenos Aires, Argentina 
				
				
				Device: moon+ reader, kindle paperwhite 
				
				
				 | 
	
	
	
		
		
		
		
		 Quote: 
	
 https://www.mobileread.com/forums/sh...1&postcount=24  | 
|
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#1025 | |
| 
			
			
			
			 Grand Sorcerer 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,525 
				Karma: 8065948 
				Join Date: Jan 2010 
				Location: Notts, England 
				
				
				Device: Kobo Libra 2 
				
				
				 | 
	
	
	
		
		
		
		
		 Quote: 
	
 Code: 
	not search:"=author has notes"  | 
|
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#1026 | |
| 
			
			
			
			 null operator (he/him) 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 22,018 
				Karma: 30277294 
				Join Date: Mar 2012 
				Location: Sydney Australia 
				
				
				Device: none 
				
				
				 | 
	
	
	
		
		
		
		
		 Quote: 
	
 I have the shortcut Ctrl+Shift+C set to Manage categories, and the 'white N in a red circle' is my <config>/resources/images/note.png image. BR  | 
|
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#1027 | |
| 
			
			
			
			 Wizard 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,292 
				Karma: 1428263 
				Join Date: Dec 2016 
				Location: Goiânia - Brazil 
				
				
				Device: iPad, Kindle Paperwhite, Kindle Oasis 
				
				
				 | 
	
	
	
		
		
		
		
		 Quote: 
	
  | 
|
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#1028 | |
| 
			
			
			
			 Wizard 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,292 
				Karma: 1428263 
				Join Date: Dec 2016 
				Location: Goiânia - Brazil 
				
				
				Device: iPad, Kindle Paperwhite, Kindle Oasis 
				
				
				 | 
	
	
	
		
		
		
		
		 Quote: 
	
 Also, when I click in the Notes header, I get this error: Spoiler: 
 
		 | 
|
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#1029 | |
| 
			
			
			
			 Grand Sorcerer 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,525 
				Karma: 8065948 
				Join Date: Jan 2010 
				Location: Notts, England 
				
				
				Device: Kobo Libra 2 
				
				
				 | 
	
	
	
		
		
		
		
		 Quote: 
	
 This is a regression introduced by adding the counts column to Manage Authors. I submitted a fix.  | 
|
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#1030 | |
| 
			
			
			
			 Wizard 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,292 
				Karma: 1428263 
				Join Date: Dec 2016 
				Location: Goiânia - Brazil 
				
				
				Device: iPad, Kindle Paperwhite, Kindle Oasis 
				
				
				 | 
	
	
	
		
		
		
		
		 Quote: 
	
 Thank you.  | 
|
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#1031 | 
| 
			
			
			
			 Grand Sorcerer 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,525 
				Karma: 8065948 
				Join Date: Jan 2010 
				Location: Notts, England 
				
				
				Device: Kobo Libra 2 
				
				
				 | 
	
	
	
		
		
		
		
		 
			
			Yes. That template returns True ('1') if any author for the book has a note. Using "not" with this will return True if no author has a note. I think this is the wrong answer if a book has (for example) two authors where one author has a note and the other doesn't.
		 
		
	
		
		
		
		
		
		
		
		
		
		
	
	 | 
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#1032 | 
| 
			
			
			
			 Grand Sorcerer 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,525 
				Karma: 8065948 
				Join Date: Jan 2010 
				Location: Notts, England 
				
				
				Device: Kobo Libra 2 
				
				
				 | 
	
	|
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#1033 | |
| 
			
			
			
			 Grand Sorcerer 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,525 
				Karma: 8065948 
				Join Date: Jan 2010 
				Location: Notts, England 
				
				
				Device: Kobo Libra 2 
				
				
				 | 
	
	
	
		
		
		
		
		 Quote: 
	
 Code: 
	python:
def evaluate(book, context):
	field_name = context.arguments[0] if context.arguments is not None and  len(context.arguments) == 1 else None
	if field_name is None:
		raise NameError("The argument for the field name wasn't provided")
	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(field_name)
		context.globals['items_with_notes'] = items_with_notes
		context.globals['item_name_map'] = db.get_item_name_map(field_name)
	item_name_map = context.globals['item_name_map']
	vals = book.get(field_name)
	if vals is None:
		return ''
	if isinstance(vals, str):
		vals = tuple((vals,))
	for val in vals:
		if item_name_map.get(val) not in items_with_notes:
			return ''
	return '1'
I stored it with the name "all_items_have_notes". I understand that you want to know if any author for a book doesn't have a note. In this case you would use Code: 
	not template:"""program: all_items_have_notes('authors')#@#:b:yes"""
 | 
|
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#1034 | 
| 
			
			
			
			 Wizard 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,292 
				Karma: 1428263 
				Join Date: Dec 2016 
				Location: Goiânia - Brazil 
				
				
				Device: iPad, Kindle Paperwhite, Kindle Oasis 
				
				
				 | 
	
	
	
		
		
		
		
		 
			
			Thank you very much!
		 
		
	
		
		
		
		
		
		
		
		
		
		
	
	 | 
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#1035 | ||
| 
			
			
			
			 null operator (he/him) 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 22,018 
				Karma: 30277294 
				Join Date: Mar 2012 
				Location: Sydney Australia 
				
				
				Device: none 
				
				
				 | 
	
	
	
		
		
		
		
		 Quote: 
	
 The only reason I can imagine one would want to select multiple authors in Manage authors would be to attach the same note (or link) to multiple authors, but a subsequent change or delete to the note (or link) in one author would not ripple through to other authors. Quote: 
	
 BR Last edited by BetterRed; 10-28-2024 at 06:45 PM.  | 
||
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
![]()  | 
            
        
            
| Tags | 
| custom column, tag, tags | 
            
  | 
    
			 
			Similar Threads
		 | 
	||||
| Thread | Thread Starter | Forum | Replies | Last Post | 
| Should composite columns appear in Grouped Searches? | ownedbycats | Library Management | 3 | 02-13-2021 04:43 PM | 
| Having problems with composite columns and save/send templates | Trel | Calibre | 4 | 09-26-2016 04:21 PM | 
| Tooltips for narrow columns | theducks | Library Management | 7 | 03-16-2015 11:58 PM | 
| Techniques to use plugboards, custom columns and templates | kovidgoyal | Library Management | 0 | 01-26-2011 05:21 PM |