View Single Post
Old 04-05-2023, 02:43 PM   #1062
ownedbycats
Custom User Title
ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.
 
ownedbycats's Avatar
 
Posts: 11,151
Karma: 77213683
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
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.
ownedbycats is offline   Reply With Quote