# UDT Instance Tag Names in Historian

**URL:** <https://forum.inductiveautomation.com/t/udt-instance-tag-names-in-historian/30280>\
**Category:** Ignition\
**Created:** [November 27, 2019, 6:37pm UTC](https://forum.inductiveautomation.com/t/udt-instance-tag-names-in-historian/30280 "2019-11-27T18:37:35Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![john.keshecki](https://avatars.discourse-cdn.com/v4/letter/j/c57346/32.png) [@john.keshecki](https://forum.inductiveautomation.com/u/john.keshecki)\
**Post date:** [November 27, 2019, 6:37pm UTC](https://forum.inductiveautomation.com/t/udt-instance-tag-names-in-historian/30280/1 "2019-11-27T18:37:36Z")

</div>

Hi,

I have a UDT called “Storage\_Tank.” From that UDT, I have several instances: TK1, TK2, TK3, etc. Each instance has an OPC tag called “Gallons.” When I bring the “Gallons” tag up in the historian, “Gallons” from each instance is just named “Gallons.” So they’ll be labeled “Gallons”, “Gallons 1”, “Gallons 2”, “Gallons 3”, etc when they are plotted in the historian together. This gets a little confusing when look at the history for multiple tanks at the same time.

Is there any way to reference the instance name in the OPC tag name? So it’ll read “[Instance Name] [Tag Name]” or something like that in the historian?

Thanks

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [November 27, 2019, 7:05pm UTC](https://forum.inductiveautomation.com/t/udt-instance-tag-names-in-historian/30280/2 "2019-11-27T19:05:58Z")

</div>

Yes - what you'll want to do is implement the `onTagsDropped` extension function on the Easy Chart component, so that you can reference an element from your UDT path when making the new tag pen on the chart. See this post for a basic example:

> [@OnTagsDropped - Auto Axis to display Eng Unit Label](http://forum.inductiveautomation.com/t/ontagsdropped-auto-axis/19906/2):
>
> #Set up the chart defaults. default = ['DefaultName', # name '[~]DefaultPath', # tag\_path 'MinMax', # aggregation\_mode 'Default Axis', # axis 1, # subplot True, # enabled "color(255,0,0,255)", # color '', # dash\_pattern 1, # render\_style 1.0, # line\_weight 0, # shape True, # fill\_shape False, # labels '', # group\_name False, # digital False, # override\_autocolor False, # hidden True, # user\_selectable None, # sort\_order False] # user\_removable tagpens = self.tagPens for…

See the manual for more information on the function and the chart component; there's a specific section on 'Extension Functions' that goes into more detail:  
[https://docs.inductiveautomation.com/display/DOC80/Vision+-+Easy+Chart](https://docs.inductiveautomation.com/display/DOC80/Vision+-+Easy+Chart)

---

<div class="post-metadata">

**Author:** ![john.keshecki](https://avatars.discourse-cdn.com/v4/letter/j/c57346/32.png) [@john.keshecki](https://forum.inductiveautomation.com/u/john.keshecki)\
**Post date:** [November 27, 2019, 8:48pm UTC](https://forum.inductiveautomation.com/t/udt-instance-tag-names-in-historian/30280/3 "2019-11-27T20:48:45Z")

</div>

Thank you!
