Code:
program:
publisher = $publisher;
ids = $identifiers;
u = select(ids, 'url');
s = select(ids, 'standard');
if publisher == 'Standard Ebooks' && u != s then
n = re(u, '^^https://standardebooks.org/ebooks/()', '\1');
ids = list_union(ids, strcat('standard:', n), ',')
fi;
if publisher == 'Standard Ebooks' && u && s then
ids = list_difference(ids, strcat('url:', u), ',')
fi;
ids
In an Action Chain, if I run this once, it produces the standardidentifier and does not delete the url: identifier. If I run it on a book that has both standard and url: identifiers it does delete the url:. Do I need to make it two separate actions/templates?