There are two solutions:
- Create a New chain
Create a new chain with a single action: "Search Using Templates", using the following Templates:
Code:
program:
if from_search('id', '#reading_status:"=Currently Reading"') then
'#reading_status:"=Currently Reading"'
else
'#reading_status:"=TBR"'
fi
Note: Make sure the option "Template output is a calibre search" is chosen.
- Modify your existing chain
Modify you chain as follows:- Make sure in the first "Selection Modifier" action the option "Select first book in current view" is selected.
- Add a second "Selection Modifier" action with this search:
Code:
#reading_status:"=TBR"
Note, however, that you must put this condition on it (Right click > Add/Modify conditions):
Code:
template = program: from_selection('id')
datatype = text
comparison = "!="
condition value =
The first solution is the simpler solution. But since your #reading_status is a composite column, I think the second might perform better. Experiment with the two and see what fits you better.
Edit: The two template functions from_search() and from_selection() are only available in Action Chains plugin. @chaley has since introduced a template function called book_values() that can replace from_search().