I'm having a bit of trouble figuring out how formulas work and am wondering if I'm misusing it here.
Code:
program:
## Field guides, fanfiction exchanges, and various other unordered series
collections = first_non_empty(
'Golden Guides' in $series,
'Mass Effect Big Bang \d{4}' in $series,
'Spectre Requisitions \d{4}' in $series,
'N7 Exchange \d{4}' in $series,
'Across Dark Space \d{4}' in $series,
);
if collections then columnupdate_seriesindex(0) fi
This is the code of columnupdate_seriesindex(). It changes the seriesindex to the argument.
This works as expected if I run it on a single book - if the series matches 'collections' it changes series_index to 0. It also works if I run it on two books that match or two books that don't match.
If I run it on two books where one matches and the other doesn't, it just results in an empty window (and the matched book fails to update). I'm thinking it's checking both books at once instead of each one separately.