While trying to set up the template in #530 I found a failure point that I'm surprised I managed to miss:
Code:
program:
if
!$#purchasesource=="Amazon"
&& select($identifier, 'amazon')
then
list_difference ($identifier, strcat('amazon:', select($identifier, 'amazon')), ',')
elif
!$#purchasesource=="Barnes & Noble"
&& select($identifier, 'barnesnoble')
then
list_difference ($identifier, strcat('barnesnoble:', select($identifier, 'barnesnoble')), ',')
elif
!$#purchasesource=="Kobo"
&& select($identifier, 'kobo')
then
list_difference ($identifier, strcat('kobo:', select($identifier, 'kobo')), ',')
elif
!$#purchasesource=="Baen"
&& select($identifier, 'baen')
then
list_difference ($identifier, strcat('baen:', select($identifier, 'baen')), ',')
fi
If it finds
one unwanted identifier, it would then skip the rest.

What should I use instead of if-thens?