![]() |
#16 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,327
Karma: 5306
Join Date: Jan 2014
Device: none
|
Thanks so much.
I was wondering if these could be combined. I would like to keep the composed icon as I have another rule with icon in the same column. As it is now both icons show up, I was wondering if combining it would be the trick to only showing one of them at a time. Code:
program: cmp(count(field('#fandoms'),'&'), 2,'','', 'multi.png') Code:
program: cmp(count(field('#fandoms'),'&'), 1,'','', 'crossover.png') |
![]() |
![]() |
![]() |
#17 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 24,905
Karma: 47303824
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
|
The problem you are having is that the definition of the cmp function is:
Code:
cmp(x, y, lt, eq, gt) That means that the second template returns the icon name if there is two or more fandoms. And the first template returns the icon name if there are three or more fandoms. But, if there are three or more fandoms, then the condition in the second template is also met, so it returns the icon as well. With this, the second template should be: Code:
program: cmp(count(field('#fandoms'), '&'), 2, '', 'crossover.png', '') But, combining them is probably better: Code:
program: cmp(count(field('#fandoms'), '&'), 2, '', 'crossover.png', 'multi.png') Disclaimer: I haven't tested these templates. They have been written by looking at the manual. |
![]() |
![]() |
Advert | |
|
![]() |
#18 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,616
Karma: 12595249
Join Date: Jun 2009
Location: Madrid, Spain
Device: Kobo Clara/Aura One/Forma,XiaoMI 5, iPad, Huawei MediaPad, YotaPhone 2
|
|
![]() |
![]() |
![]() |
#19 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,327
Karma: 5306
Join Date: Jan 2014
Device: none
|
Thanks.
I was wondering, can I combine ratings like those in the attached images in an advanced rule as well? It's a comma separated text, like tags, shown in the tag browser column. Thanks again for the help. Last edited by Tanjamuse; 04-05-2018 at 05:25 AM. |
![]() |
![]() |
![]() |
#20 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,327
Karma: 5306
Join Date: Jan 2014
Device: none
|
I've tested this quite a bit, but no luck.
Code:
program: cmp(count(field('#fandoms'), '&'), 2, '', 'crossover.png', 'multi.png') Code:
program: cmp(count(field('#fandoms'),'&'), 2,'','', 'multi.png') Code:
program: cmp(count(field('#fandoms'),'&'), 1,'','', 'crossover.png') |
![]() |
![]() |
Advert | |
|
![]() |
#21 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 24,905
Karma: 47303824
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
|
That looks like it should work. At least if I understand what you are trying to do. But, how is this configured elsewhere, and what actually happens?
|
![]() |
![]() |
![]() |
#22 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,327
Karma: 5306
Join Date: Jan 2014
Device: none
|
It was a simple oversight on my part ... I had forgotten that I renamed the icons
![]() ![]() ![]() |
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Help with Icon Rule | Tanjamuse | Library Management | 17 | 10-13-2016 03:30 PM |
Advanced Custom Icon with two requirements | One4Tanner | Library Management | 3 | 03-11-2015 02:14 AM |
The 5 finger rule. | AlexGrama | General Discussions | 73 | 02-26-2012 05:19 AM |
ID: Rule Above and Below | dezignlady | ePub | 5 | 07-12-2011 11:40 PM |
Will One Device Rule Them All... Or Not | thymaster | General Discussions | 65 | 11-23-2010 01:19 PM |