AnsweredAssumed Answered

Groovy Script - Name of Tag

Question asked by Brian Olson on Dec 23, 2014

Hello, I'm working on creating some groovy scripts to tag my assets. I'm currently using the naming convention


Tag Name - regex


My thought is that having the regex in the tag name will make it easier to identify what the tag does. I then copy the regex into a groovy script that compares matches it against relevant QIDs.


I'm wondering if there's a way I can access the name of the tag I'm in using a groovy script so that I can pull off the last part of the tag name and use that as the regex in the script instead of copy and pasting it.


I found this post on Stackoverflow explaining how to iterate through defined variables scripting - How do I enumerate all the defined variables in a groovy script - Stack Overflow but when I try to run it, I get an error that I am not allowed to access objects of type Script.


Is there some way for me to access the name of the tag the script is running in?


Thanks for any help!