View Single Post
Old 07-07-2013, 07:57 AM   #2
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,522
Karma: 8065528
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
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:	344
Size:	35.7 KB
ID:	107872  
chaley is offline   Reply With Quote