View Single Post
Old 05-25-2019, 08:26 AM   #3
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: 11,742
Karma: 6997045
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
A variant of this template will do what you want, using the ability of regular expressions to do an "or". Fix "ta" (I don't have all your columns). Also, I am not sure what column contains the Sci-Fi and Fantasy values. I assumed it was "tags".
Code:
program:
	ta = 'aaa';
	t = field('tags');
	str_in_list(t, ',', 'Fiction', 
		in_list(t, ',', '^(Sci-Fi|Fantasy)$',
			strcat('eBooks/sci-fi or fantasy/', ta),
			strcat('eBooks/thriller/', ta)),
		strcat('eBooks/Non-Fiction/', ta))
chaley is offline   Reply With Quote