Quote:
Originally Posted by Dirk2718
I have a similar problem. I want to put some books in an additional folder. So I add a custom column with column type "Yes/No" and changed the Save Template to this, so that every book with a yes in the column "extradir" will be copied to the additional directory "DirName".
Code:
{extradir||DirName/}{author_sort}/{title} - {authors}
But this code doesn´t work. The books are still copied to {author_sort}/{title} - {authors}.
What did I make wrong?
|
Three problems:
1) The lookup name for a custom column must begin with the '#' character.
2) You left off the colon after the lookup name
3) You will get the values "YesDirName/" and "No". I assume you do not want the "Yes" or the "No" to be there.
The following in
single function mode fixes all three problems.
Code:
{#extradir:test(DirName/,)}{author_sort}/{title} - {authors}
The following in
template program mode is equivalent
Code:
{#mybool:'test($, 'DirName/', '')'}{author_sort}/{title} - {authors}
as is the following in
general program mode.
Code:
program: strcat (test(field('#mybool'), 'DirName/', ''), template('{author_sort}/{title} - {authors}'))