Quote:
Originally Posted by ownedbycats
If I run the same template on a book that has no #purchasesource, it removes all four of them. If no identifiers are removed, it just returns the original list.
|
This template should do what your template does. I haven't tried it because I didn't set up the columns and the data.
Code:
program:
def do_one(ids, check_value, select_identifier):
si = select($identifier, select_identifier);
if
!$#purchasesource==check_value && si
then
return list_difference (ids, strcat(select_identifier, si), ',')
fi;
return $ids
fed;
ids = do_one($identifiers, "Amazon",'amazon');
ids = do_one(ids, "Barnes & Noble", 'barnesnoble');
ids = do_one(ids, "Kobo", 'kobo');
ids = do_one(ids, "Baen", 'baen')