View Single Post
Old 05-15-2022, 03:21 PM   #865
ackomb
Zealot
ackomb has a spectacular aura aboutackomb has a spectacular aura aboutackomb has a spectacular aura aboutackomb has a spectacular aura aboutackomb has a spectacular aura aboutackomb has a spectacular aura aboutackomb has a spectacular aura aboutackomb has a spectacular aura aboutackomb has a spectacular aura aboutackomb has a spectacular aura aboutackomb has a spectacular aura about
 
Posts: 106
Karma: 4486
Join Date: Mar 2020
Location: Netherlands
Device: i-pad
Quote:
Originally Posted by chaley View Post
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, ',')
Thanks, that got me going in the right direction. I'm going to fiddle with it for a while.

ackomb is offline   Reply With Quote