# Using the tag name as a parameter

**URL:** <https://forum.inductiveautomation.com/t/using-the-tag-name-as-a-parameter/8869>\
**Category:** Ignition\
**Created:** [August 6, 2014, 8:40pm UTC](https://forum.inductiveautomation.com/t/using-the-tag-name-as-a-parameter/8869 "2014-08-06T20:40:19Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![fledder](https://avatars.discourse-cdn.com/v4/letter/f/e19b73/32.png) [@fledder](https://forum.inductiveautomation.com/u/fledder)\
**Post date:** [August 6, 2014, 8:40pm UTC](https://forum.inductiveautomation.com/t/using-the-tag-name-as-a-parameter/8869/1 "2014-08-06T20:40:19Z")

</div>

So I have a bunch of data types that I want to name the same as the PLC tag. So I currently have a parameter called Tag, which has the same value as the Data Type instance. Is there any way to use the meta property of the instance in the OPC item path? Pseudo syntax might be “{meta.Tagname}” or something…

---

<div class="post-metadata">

**Author:** ![Colby.Clegg](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/colby.clegg/32/3282_2.png) [@Colby.Clegg](https://forum.inductiveautomation.com/u/Colby.Clegg)\
**Post date:** [August 6, 2014, 11:13pm UTC](https://forum.inductiveautomation.com/t/using-the-tag-name-as-a-parameter/8869/2 "2014-08-06T23:13:41Z")

</div>

Not currently, but this has been a very often requested feature in regards to UDTs.

Our plan was to add certain “pre-defined” meta parameters, such as “TagName” (for the specific tag inside of the udt) and “InstanceName” (for the name of the enclosing instance.

I think this would be easy enough to do for 7.7.1, would that cover what you’re trying to do?

Regards,

---

<div class="post-metadata">

**Author:** ![fledder](https://avatars.discourse-cdn.com/v4/letter/f/e19b73/32.png) [@fledder](https://forum.inductiveautomation.com/u/fledder)\
**Post date:** [August 6, 2014, 11:22pm UTC](https://forum.inductiveautomation.com/t/using-the-tag-name-as-a-parameter/8869/3 "2014-08-06T23:22:44Z")

</div>

So if I had a UDT instance called FV10101, I would have a predefined parameter I could use called {TagName} that would evaluate to the string “FV10101”? That would be… amazing.

---

<div class="post-metadata">

**Author:** ![Colby.Clegg](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/colby.clegg/32/3282_2.png) [@Colby.Clegg](https://forum.inductiveautomation.com/u/Colby.Clegg)\
**Post date:** [August 6, 2014, 11:41pm UTC](https://forum.inductiveautomation.com/t/using-the-tag-name-as-a-parameter/8869/4 "2014-08-06T23:41:06Z")

</div>

Yes, that’s essentially what I’m suggesting. The only slightly weird case is when you have UDTs inside of UDTs… do you get the name of the closest UDT parent, or the overall instance? Considering that parameter values can be set to parent parameters, perhaps it naturally gives you the closest name, and if you wanted, you could override the “InstanceName” parameter on that one to reference {InstanceName}, which would then pull from the parent?

I doubt too many people would want to get that complex, though. Probably just giving the name of the closest UDT would be sufficient.

Regards,

---

<div class="post-metadata">

**Author:** ![fledder](https://avatars.discourse-cdn.com/v4/letter/f/e19b73/32.png) [@fledder](https://forum.inductiveautomation.com/u/fledder)\
**Post date:** [August 6, 2014, 11:55pm UTC](https://forum.inductiveautomation.com/t/using-the-tag-name-as-a-parameter/8869/5 "2014-08-06T23:55:07Z")

</div>

[http://i.imgur.com/j74SykU.gif](http://i.imgur.com/j74SykU.gif)

I think nearest udt would work… you could always make a mem tag on the parent with a value of the built in meta param or something… but I think the use case would be almost 100% wanting the name of the nearest one.

---

<div class="post-metadata">

**Author:** ![MikeCarpenter](https://avatars.discourse-cdn.com/v4/letter/m/57b2e6/32.png) [@MikeCarpenter](https://forum.inductiveautomation.com/u/MikeCarpenter)\
**Post date:** [July 22, 2015, 7:29pm UTC](https://forum.inductiveautomation.com/t/using-the-tag-name-as-a-parameter/8869/6 "2015-07-22T19:29:15Z")

</div>

I apologize if I’m resurrecting a dead thread…just wondering if this was actually implemented or not. I just tried using {InstanceName} in the name of a Tag in a UDT and it doesn’t seem to work.

Thanks!  
Mike

---

<div class="post-metadata">

**Author:** ![Micky.Franks](https://avatars.discourse-cdn.com/v4/letter/m/c57346/32.png) [@Micky.Franks](https://forum.inductiveautomation.com/u/Micky.Franks)\
**Post date:** [July 23, 2015, 3:46pm UTC](https://forum.inductiveautomation.com/t/using-the-tag-name-as-a-parameter/8869/7 "2015-07-23T15:46:27Z")

</div>

I am actually using this method for my tags.

```auto
[PACK]Program:MAIN.{InstanceName}.MSTART
```

I know on my application using a CompactLogix, the path is case sensitive.
