Oh, what a delicious problem.
There are two approaches to accomplish this, both illustrated in the attached.
- Populate $Tags from individual lines in $Text with an Edict
- Populate $Tags (in this demo $TagsApproach2) with an $Edict that collects children
Personally, I prefer approach 2 as that actually lets me create a note that lets me define the tag, to which I can later use in a glossary.
Example file attached:
TBX L - Tags and Lookup Lists Two Approaches.tbx (123.5 KB)
I’m pretty tied up right now, but if you’d like we can discuss the action code and regex later.