View Single Post
Old 09-12-2024, 08:42 AM   #8
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 12,447
Karma: 8012886
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by Comfy.n View Post
It works in the template editor, showing "Yes" for a given value when a book whose author's notes contain the string is currently selected.

However when I paste the template in the search bar, it returns no results, so I must be doing something the wrong way
Works for me when using the advanced search template search builder running from latest source (with the fix). This example finds any note containing the letter 'a'.

Template:
Code:
program:
	first_author = sublist($authors, 0, 1, '&');
	note = get_note('authors', first_author, '1');
	if 'a' in note then
		ans = 'Yes'
	else
		ans = ''
	fi;
	ans
The template search dialog:
Click image for larger version

Name:	Clipboard01.jpg
Views:	166
Size:	67.6 KB
ID:	210791

Note that the template search generated by the dialog contains more than just the template.

Last edited by chaley; 09-12-2024 at 08:44 AM.
chaley is offline   Reply With Quote