Quote:
Originally Posted by BetterRed
@ chaley - can this be done (maybe we've been here before)
- create a User Category for Important Authors,
- interrogate the Important Authors list in a true/false composite column template (function mode maybe ?) -- #is_important/Is Important
- then use the value of the #is_important composite column in the icon rule.
BR
|
You are correct, this can work, but I make no guarantees about performance. It could be very slow, depending on how well calibre's caching works.
To fill out your example:
- Create a user category, which for this example we will call 'Important Authors'. This should not be a hierarchical category.
- Put some authors into the new user category.
- Make a custom column "built from other columns. Name it whatever you want. For this example I will use #important. Set "Show Checkmarks" if you want visible confirmation. Set the template to
Code:
{:'str_in_list(user_categories(), ',', 'Important Authors', 'Yes', 'No')'}
- Create a rule that checks #important for "Yes".
Note that this technique will work with any category value you put in the user category. For example, if you put a series into the category then #important will be "Yes" for all books in that series.
If you want to use a hierarchical category then two things must be true.
- The outermost category name (Important Authors) must be unique. It cannot be a substring of any other category or subcategory name.
- Use this template:
Code:
{:'contains(user_categories(), 'Important Authors', 'Yes', 'No')'}