View Single Post
Old 11-06-2020, 06:14 AM   #900
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 12,345
Karma: 8012652
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by ownedbycats View Post
That works. I was just starting out with the two identifiers as a a test case. Eventually I want to encompass more identifiers in descending priority (e.g. if isbn or goodreads doesn't exist, check asin, then google, then url, etc...).
Then you want to use first_non_empty, in which you can list the order by priority. Example:
Code:
program:
	i = field('identifiers');
	first_non_empty(
		select(i, 'isbn'),
		select(i, 'goodreads')
# more as desired
	)
chaley is offline   Reply With Quote