![]() |
#16 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,447
Karma: 8012886
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Quote:
For example: Code:
program: test( and( contains(field('#readinglist'), 'interesting', 'y', ''), or( contains(field('#ships'), "Angela Montenegro/Jack Hodgins", 'y', ''), contains(field('#ships'), "Temperance Brennan/Seeley Booth", 'y', '') ) ), '', 'ships (crime).png' ) Code:
program: test( and( contains(field('#readinglist'), 'interesting', 'y', ''), or( contains(field('#ships'), "Angela Montenegro/Jack Hodgins", 'y', ''), contains(field('#ships'), "Temperance Brennan/Seeley Booth", 'y', '') ) ), 'ships (crime).png', 'sinking ships (crime).png' ) |
|
![]() |
![]() |
![]() |
#17 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,327
Karma: 5306
Join Date: Jan 2014
Device: none
|
Thanks, I thought it was something like changing the Y in the lines to a N.
Is it possible to combine these two rules as well: Code:
program: test( and( contains(field('#readinglist'), '^interesting$', 'y', ''), or( contains(field('#ships'), "Angela Montenegro/Jack Hodgins", 'y', ''), contains(field('#ships'), "Temperance Brennan/Seeley Booth", 'y', '') ), ), 'ships (crime).png', '' ) Code:
program: test( and( contains(field('#reading_list'), 'interesting', 'y', ''), or( contains(field('#ships'), "Angela Montenegro/Jack Hodgins", 'y', ''), contains(field('#ships'), "Temperance Brennan/Seeley Booth", 'y', '') ) ), 'ships (crime).png', 'never.png' ) |
![]() |
![]() |
Advert | |
|
![]() |
#18 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,447
Karma: 8012886
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
As far as I can see the only differences are the removal of the anchors on the "interesting" line and the addition of the alternate icon.
If you really meant to remove the anchors then the only way to combine the two rules is to use first_non_empty with the separate rule sets. Best would be to set some variable to the result of the "contains" tests so you don't recalculate them. I am out of time so I must leave it to you to work out how to do it. |
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
One File to Rule Them All ? | storax | Workshop | 3 | 08-14-2013 08:12 PM |
One device to rule them all | BeccaPrice | General Discussions | 95 | 08-17-2012 06:15 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 |