View Single Post
Old 08-23-2021, 05:26 AM   #145
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,486
Karma: 8025704
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by ownedbycats View Post
Question: for my composite chapter count column:

Attachment 188857

Is it possible, with a template, to display icon only if the first number is one less than the second?

1/2 - icon.png
2/2 - no icon
99/100 - icon.png
50/100 - no icon
50 - no icon

If it helps, here's the composite. It pulls the numbers from #chaptercount and #kobobookmark:
Yes. Use an advanced rule that examines the values and generates an icon if needed. Something like this:
Code:
program:
	t = $#tool;
	if '/' in t then
		f = re(t, '(.*)/.*', '\1');
		s = re(t, '.*/(.*)', '\1');
		if f <# s then
			'icon.png'
		fi
	fi
chaley is offline   Reply With Quote