Question:
Previously, in the template I have to generate Kobo collections (not composite; Action Chains single-field edit) was something like this:
Code:
if $#booktype == 'Fanfiction' then 'Fanfiction' fi,
if $#booktype == 'Fiction' then 'Fiction' fi,
if $#booktype == 'Nonfiction' then 'Nonfiction' fi,
(#booktype is enumerated)
Obviously, that could be simplified:
Code:
program:
genre = $#subjects;
colls = strcat(
$#booktype,
if 'overdrive' in approximate_formats() then 'Loans,' fi,
if $$#purchasecost == '0.00' then 'Freebies,' fi,
if '^Horses$' inlist genre then 'Horses,' fi,
if '^Cozy Mystery$' inlist genre then 'Cozy Mysteries,' fi,
if '^(Fantasy|Science Fiction|Paranormal)$' inlist genre then 'Fantasy & Sci-Fi,' fi,
if 'Omnibus' in $#admintags then 'Omnibuses' fi
);
new_colls = list_union($#kobocoll, colls, ',')
How do I get #booktype to also return a comma?