Question:
I have this template in an Action Chains single-field edit for semi-automated updating of my Kobo collection/shelf column:
Code:
program:
g = field('#genres');
k = field('#kobocoll');
vl = field('#vls');
v = first_non_empty(
list_contains(vl, ',', '^Loans$', 'Loans', ''),
list_contains(g, ',', '^Fanfiction$', 'Fanfiction', ''),
list_contains(g, ',', '^Horses$', 'Horses', ''),
list_contains(g, ',', '^Cozy Mystery$', 'Cozy Mysteries', ''),
list_contains(g, ',', '^(Fantasy|Science Fiction)$', 'Fantasy & Sci-Fi', ''),
);
list_union(k, v, ',')
Performance isn't an issue, it's only run on demand. But since the "Loans" virtual library only criteria is that the book has an
.OVERDRIVE format, would it be better practice to check for that rather than the VL?