Retrieve tagpath of value property

Is it possible to get the tagpath from the value property or other on a component through scripting?

We set up a click to graph feature where we select a numeric label where it uses a script to put the path (which we hard code in or use the meta data’s tagpath on template components) into a list, and when we select a button to trend all values (paths) that were selected. The last piece of making this truly dynamic is getting rid of hard coding the tag’s path in each numeric label component script.

Thanks!