Question:
Code:
program:
ids = $identifiers;
mobi = select(ids, 'mobi-asin');
amazon = select(ids, 'amazon');
if
mobi && !amazon
then
n = re(mobi, '(.*)', '\1');
ids = list_union(ids, strcat('amazon:', n), ',')
else
ids
fi;
if
mobi == amazon
then
ids = list_difference(ids, strcat('mobi-asin:', mobi), ',')
else
ids
fi
I have two books. Book #1 has only the mobi-asin identifier, while Book #2 has identical mobi-asin and amazon ids.
The results are this:
Aside from either separating the two parts into separate templates or running it twice, is there any way to tell it "do part A (copy mobi-asin to amazon), and then
also do part B (remove mobi-asin)"?
EDIT: See my post in the while loop thread.