View Single Post
Old 05-15-2022, 01:46 PM   #864
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,467
Karma: 8025600
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Off the top of my head, you can do this in search & replace.

Search field: template
Search template: program: list_intersection($#ao3tags, 'tram, train, bus, ferry', ',')
Search for: (^.*$)
Replace with: \1
Destination field: #genre
Mode: Append to field

The template produces a list of acceptable values (the second parameter) from tags. The rest S&R appends that list to #genre. Duplicates will be removed in that process.

EDIT: You didn't say if you want to use Action Chains Single Field Edit. If you do then this template should work
Code:
program:
	a = list_intersection($ao3tags, 'tram, train, bus, ferry', ',');
	list_union($#genre, a, ',')

Last edited by chaley; 05-15-2022 at 02:03 PM. Reason: Corrected the tag name, added template suitable for single field edit
chaley is offline   Reply With Quote