Hi everyone.
Why does a template test-column and the template tester for Saving Books to Disk show me 2 different results? I have a template test-column in my library in which I have this and it shows me exactly an output exactly like I want:
1 Fandom = folder named after the fandom
2 Fandoms = folder named Crossovers
3 Fandoms or more = folder named Multiple Crossovers
Code:
program:
tmp1 = template('{#fandoms:sublist(0,2,\,)}{#fandom_secondary:sublist(0,2,\,)}/{author}/{title} ({#story_id})');
tmp2 = template('Crossovers/{#fandoms:sublist(0,2,\,)}{#fandom_secondary:sublist(0,2,\,)}/{author}/{title} ({#story_id})');
tmp3 = template('Multiple Crossovers/{author}/{title} ({#story_id})');
check = count(field('#fandoms'), '&');
check=cmp(check,3,check,check,3);
## new version as "case of count =x"
switch(
check,
1, tmp1,
2, tmp2,
tmp3);
When I add this in the template editor for Saving to Disk it only creates the Multiple Crossovers folder.
I've tried removing all the spaces and everything else I could think of, but it still only shows the Multiple Crossovers folder, and when I save books none of the folders are created.
Here's the "compressed" version:
Code:
program:tmp1=template('{#fandoms:sublist(0,2,\,)}{#fandom_secondary:sublist(0,2,\,)}/{author}/{title} ({#story_id})');tmp2=template('Crossovers/{#fandoms:sublist(0,2,\,)}{#fandom_secondary:sublist(0,2,\,)}/{author}/{title} ({#story_id})');tmp3=template('Multiple Crossovers/{author}/{title} ({#story_id})');check=count(field('#fandoms'), '&');check=cmp(check,3,check,check,3);switch(check,1, tmp1,2, tmp2,tmp3);
Here's 3 versions of what it's supposed to do:
Harry Potter/Mireille/Tired (AO3-13781403)
Crossovers/Criminal Minds & Criminal Minds Beyond Borders/youvebeenwinchesterd/Cheer You Up (AO3-14946017)
Multiple Crossovers/Sevensmommy/Roots Before Branches (AO3-14882856)
I hope someone can help.
Tanjamuse