# Accessing Template 'Internal Properties' from Template Instance

**URL:** <https://forum.inductiveautomation.com/t/accessing-template-internal-properties-from-template-instance/35966>\
**Category:** Ignition\
**Tags:** vision\
**Created:** [June 24, 2020, 8:32am UTC](https://forum.inductiveautomation.com/t/accessing-template-internal-properties-from-template-instance/35966 "2020-06-24T08:32:50Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [June 24, 2020, 8:32am UTC](https://forum.inductiveautomation.com/t/accessing-template-internal-properties-from-template-instance/35966/1 "2020-06-24T08:32:50Z")

</div>

Is it possible to access Template custom ‘Internal Properties’ from the Template instance?

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [June 24, 2020, 12:10pm UTC](https://forum.inductiveautomation.com/t/accessing-template-internal-properties-from-template-instance/35966/2 "2020-06-24T12:10:06Z")

</div>

Possible? Yes, with scripting. Supported? ~~No.~~ _Yes._

Use `.getComponent(0)` a couple times to drill down into the template instance to reach the root of the running template.

Edit: I stand corrected. (:

---

<div class="post-metadata">

**Author:** ![code\_skin](https://avatars.discourse-cdn.com/v4/letter/c/43a26b/32.png) [@code\_skin](https://forum.inductiveautomation.com/u/code_skin)\
**Post date:** [June 24, 2020, 12:39pm UTC](https://forum.inductiveautomation.com/t/accessing-template-internal-properties-from-template-instance/35966/3 "2020-06-24T12:39:28Z")

</div>

I’ve always used .getLoadedTemplate() to access the template’s root container.  
After testing it seems this only allows me to get parameters and components within the template but not access the “Internal Properties”.

Seems like @pturmel’s way is documented here:  
[https://docs.inductiveautomation.com/display/DOC79/Advanced+Template+Features](https://docs.inductiveautomation.com/display/DOC79/Advanced+Template+Features)

Edit: further testing reveils I can only access internal properties via Template Repeater and Template Canvas.

```auto
tr = event.source.parent.getComponent('Template Repeater')
for template in tr.getLoadedTemplates():
	print template.getComponent('Label').text # component within the template
	print template.helloWorld # internal property

```
