Quote:
Originally Posted by Tanjamuse
That's okay  I thank you for your help, I may return with other questions later 
|
(for BR too ...)
Just for completeness and ignoring that this technique is quite technical, note that you can choose arbitrary combinations by using a custom rule.
In this example I used one tags-like custom column to hold the reading lists. In my debugging environment that column is named #mytextmult. I set up reading list to put "List1" into #mytextmult if the book is on List1 and "List2" into #mytextmult if the book is on List2.
The template for the custom rule checks the four combinations of interest:
- A book is on both lists. Returns the color "green".
- A book is on List1 only. Returns the color "red".
- A book is on List2 only. Returns the color "blue".
- A book is on neither list. Returns the color "yellow".
In all the cases the rule checks that the book is not on the device.
The sample template is:
Code:
program:
l = field('#mytextmult');
list1 = 'List1';
list2 = 'List2';
first_non_empty(
test( and( not(ondevice()),
str_in_list(l, ',', list1, '1', ''),
str_in_list(l, ',', list2, '1', '')),
'green',
''),
test( and( not(ondevice()),
str_in_list(l, ',', list1, '1', ''),
str_in_list(l, ',', list2, '', '1')),
'red',
''),
test( and( not(ondevice()),
str_in_list(l, ',', list1, '', '1'),
str_in_list(l, ',', list2, '1', '')),
'blue',
''),
test( and( not(ondevice()),
str_in_list(l, ',', list1, '', '1'),
str_in_list(l, ',', list2, '', '1')),
'yellow',
''),
)
EDIT: changed the template to use variables for the values to look for in the list.
The attachment shows the results. In addition to putting the template into a coloring rule, I put the template into a custom composite column to make it easier to see the results.