# Getting the template name

**URL:** <https://forum.inductiveautomation.com/t/getting-the-template-name/5476>\
**Category:** Ignition\
**Created:** [November 26, 2012, 7:42pm UTC](https://forum.inductiveautomation.com/t/getting-the-template-name/5476 "2012-11-26T19:42:22Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Robert](https://avatars.discourse-cdn.com/v4/letter/r/e95f7d/32.png) [@Robert](https://forum.inductiveautomation.com/u/Robert)\
**Post date:** [November 26, 2012, 7:42pm UTC](https://forum.inductiveautomation.com/t/getting-the-template-name/5476/1 "2012-11-26T19:42:22Z")

</div>

In a template, I can bind the name of the template to a property (eg: a textbox in the template can display the template name)

If I then create an instance of that template and give in a different (meaningful) name, that textbox will not display the new name.

How can I bind to the name of the instantiated template to a property in that template?

---

<div class="post-metadata">

**Author:** ![Travis.Cox](https://avatars.discourse-cdn.com/v4/letter/t/b9bd4f/32.png) [@Travis.Cox](https://forum.inductiveautomation.com/u/Travis.Cox)\
**Post date:** [November 26, 2012, 8:37pm UTC](https://forum.inductiveautomation.com/t/getting-the-template-name/5476/2 "2012-11-26T20:37:24Z")

</div>

You can’t bind to the instance name. In this situation you have to add a template parameter for the name to display.

---

<div class="post-metadata">

**Author:** ![Robert](https://avatars.discourse-cdn.com/v4/letter/r/e95f7d/32.png) [@Robert](https://forum.inductiveautomation.com/u/Robert)\
**Post date:** [November 26, 2012, 9:24pm UTC](https://forum.inductiveautomation.com/t/getting-the-template-name/5476/3 "2012-11-26T21:24:39Z")

</div>

> [@Travis.Cox](#):
>
> You can't bind to the instance name.

Feature Request: Let us do this.

This breaks how I make things fast. By giving the component the right name, I can bind all the bits of the component to use the name in the bind path, or pass it off to the scripting function to open the right window etc.

Now I have to create the component, name it, select it, edit the property with the same name. ☹

---

<div class="post-metadata">

**Author:** ![Travis.Cox](https://avatars.discourse-cdn.com/v4/letter/t/b9bd4f/32.png) [@Travis.Cox](https://forum.inductiveautomation.com/u/Travis.Cox)\
**Post date:** [November 26, 2012, 9:57pm UTC](https://forum.inductiveautomation.com/t/getting-the-template-name/5476/4 "2012-11-26T21:57:03Z")

</div>

Ok, you have pulled my leg. I have put in a request for this 🙂

---

<div class="post-metadata">

**Author:** ![Carl.Gould](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/carl.gould/32/7262_2.png) [@Carl.Gould](https://forum.inductiveautomation.com/u/Carl.Gould)\
**Post date:** [December 14, 2012, 10:22pm UTC](https://forum.inductiveautomation.com/t/getting-the-template-name/5476/5 "2012-12-14T22:22:27Z")

</div>

Ok I added a new read-only property called “instanceName” on the template for 7.5.5

---

<div class="post-metadata">

**Author:** ![Robert](https://avatars.discourse-cdn.com/v4/letter/r/e95f7d/32.png) [@Robert](https://forum.inductiveautomation.com/u/Robert)\
**Post date:** [December 17, 2012, 5:53pm UTC](https://forum.inductiveautomation.com/t/getting-the-template-name/5476/6 "2012-12-17T17:53:48Z")

</div>

Thanks Carl,

I’ll try it out.
