Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Calibre > Library Management

Notices

Reply
 
Thread Tools Search this Thread
Old 07-07-2013, 06:55 AM   #1
thvdriet
Junior Member
thvdriet began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Jul 2013
Device: Pocketbook Pro
column icon for multiple authors

Hello,
I have a column icon displayed in the <authors> column (some by name and some in general). This is no problem. But now I want to display a separate icon if the author column consist of more then one author. They are separated by the "&", but I cannot select on this.
Does anybody have an idea?
Thx for any help, Thom
thvdriet is offline   Reply With Quote
Old 07-07-2013, 07:57 AM   #2
chaley
"chaley", not "charley"
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: 4,706
Karma: 800144
Join Date: Jan 2010
Location: France
Device: Many android devices
Quote:
Originally Posted by thvdriet View Post
Hello,
I have a column icon displayed in the <authors> column (some by name and some in general). This is no problem. But now I want to display a separate icon if the author column consist of more then one author. They are separated by the "&", but I cannot select on this.
Does anybody have an idea?
Thx for any help, Thom
You need to use an advanced rule for this. Advanced rules use General Program Mode templates, which can do much more than the set of conditions built into the rules.

The following GPM template gets the number of authors. If that number is 1 it returns the icon file name for an up-pointing green triangle. If it is more than 1 it returns the icon file name for a down-pointing green triangle.
Code:
program:
	cmp(count(field('authors'), '&'), 1, '', 'arrow-up.png', 'arrow-down.png')
For completeness I am attaching a screen shot of the advanced rule editor.
Attached Thumbnails
Click image for larger version

Name:	Clipboard03.png
Views:	37
Size:	35.7 KB
ID:	107872  
chaley is offline   Reply With Quote
Old 07-07-2013, 01:49 PM   #3
thvdriet
Junior Member
thvdriet began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Jul 2013
Device: Pocketbook Pro
Wow, thx for the quick reply AND it works!
thvdriet is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Custom Column Icon Help alanHd Library Management 2 02-04-2013 03:30 AM
BUG - Column Coloring, multiple conditions icq70610 Calibre 8 12-26-2012 07:34 AM
Can I generate Additional Authors column which shares Authors data? GeekyGal Library Management 4 10-04-2011 09:17 PM
Is it possible to sort a custom column like authors or title? arspr Library Management 2 03-15-2011 04:44 PM
displaying multiple values in the same column beneath each other Firedancer885 Calibre 2 11-27-2010 03:13 PM


All times are GMT -4. The time now is 10:27 PM.


MobileRead.com is a privately owned, operated and funded community.