View Single Post
Old 10-29-2014, 06:42 AM   #2
davidfor
Grand Sorcerer
davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.
 
Posts: 24,905
Karma: 47303824
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
I have a column that shows the progress in a book pulled from my Kobo devices. I then use multiple icons to show more status. A tick for finished, a book for reading, a star if I want to rate it somewhere and a couple of other things. I think there can be five icons.

To do this, the icon rule has to be either "composed icons w/no text" or "composed icons with text". Two of the rules are:
Code:
Advanced Rule: set composed icons w/no text for column Kobo % Read:
<pre>program:
	test(
		or(
			cmp(field('#kobo_percentread'), 100, '', 'Y', 'Y'),
			str_in_list(field('#status'), ',', 'Finished', 'y', ''),
			field('#read')),
	'ok.png',
	'')
That puts the tick in the column if the book is 100% finished or a couple of other conditions (which I should remove). The column #status is populated by a reading list. It also means the value isn't displayed.

Code:
Advanced Rule: set composed icons w/text for column Kobo % Read
program:
	str_in_list(field('#status'), ',', 'toRate', 'rating.png', '')
Which puts a star in the column if the book is in the "To rate" list.

When I finish a book, I connect the device, fetch the status and put the book into the "to rate' list. The tick and the star are displayed with no text. When I move the book from the "to rate" list to the "Finished" list, the star disappears.
davidfor is offline   Reply With Quote