# Access Template RootContainer's custom Property

**URL:** <https://forum.inductiveautomation.com/t/access-template-rootcontainers-custom-property/30361>\
**Category:** Ignition\
**Created:** [December 2, 2019, 2:09pm UTC](https://forum.inductiveautomation.com/t/access-template-rootcontainers-custom-property/30361 "2019-12-02T14:09:56Z")\
**Posts on this page:** 1\
**Showing post:** 9

<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:** [December 2, 2019, 4:54pm UTC](https://forum.inductiveautomation.com/t/access-template-rootcontainers-custom-property/30361/9 "2019-12-02T16:54:03Z")

</div>

> [@kaushik.shah](#):
>
> setPropertyValue

I think your issue might be using this function to write to the parameter.

Try using setattr instead as in Phil's post here:

> [@Function to set component property](http://forum.inductiveautomation.com/t/function-to-set-component-property/15074/3):
>
> Why wouldn’t one just use python’s setattr() function? Like so: def setPropertyValue(comp, prop, val): setattr(comp, prop, val) Consider catching AttributeError, though, to fall back on the setPropertyValue() method applicable to custom properties (not always supported by setattr). Like so: def setPropertyValue(comp, prop, val): try: setattr(comp, prop, val) except AttributeError: return comp.setPropertyValue(prop, val)

---

_[View the full topic](https://forum.inductiveautomation.com/t/access-template-rootcontainers-custom-property/30361)._
