Quote:
Originally Posted by chaley
First question: what is a "topmost tag"? It seems that it is the first first hierarchical component of the first tag on the list, but as you can't depend on the order of tags in the list that seems wrong.
What do you want to have happen if the first tag is '[Cleanup]'? Do you want the second tag? if so then this would work:
Code:
t = sublist($tags, 0, 1, ',');
if t == "[CLEANUP]" then
t = sublist($tags, 1, 2, ',')
fi;
re(t, '^(.*?)($|\..*$)', '\1')
|
"Topmost tag" -- if 'Fiction.Mystery.Cozy Mystery', then 'Fiction.' If 'Nonfiction.Biographies & Memoirs', then 'Nonfiction.' I call it that because in the tag browser it appears at the top of the hierarchy.
And yes, just go to the next tag. Hopefully the code works.