Code:
program:
status = readstatus();
times = $$#timesread;
readgoal = strcat('readinggoal:', format_date(today(), 'yyyy'));
switch_if(
status=='read', 'Read',
status=='didnotfinish', 'Did Not Finish',
status=='currentlyreading',
if times >#0 then 'Currently Rereading'
else 'Currently Reading' fi,
status=='toberead', 'To Be Read',
status=='unread',
if readgoal in $#admintags && $$#lastread then 'To Be Read'
elif readgoal in $#admintags then 'Backlog'
else 'Unread' fi,
''
)
Every book that matches unread and readgoal returns 'To Be Read', not just the ones with non-null dates. What did I do wrong?