# Template internal property values changing multiple times

**URL:** <https://forum.inductiveautomation.com/t/template-internal-property-values-changing-multiple-times/15346>\
**Category:** Ignition\
**Tags:** ignition79, scripting\
**Created:** [September 14, 2017, 9:56pm UTC](https://forum.inductiveautomation.com/t/template-internal-property-values-changing-multiple-times/15346 "2017-09-14T21:56:16Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![iamthebull](https://avatars.discourse-cdn.com/v4/letter/i/58f4c7/32.png) [@iamthebull](https://forum.inductiveautomation.com/u/iamthebull)\
**Post date:** [September 14, 2017, 9:56pm UTC](https://forum.inductiveautomation.com/t/template-internal-property-values-changing-multiple-times/15346/1 "2017-09-14T21:56:16Z")

</div>

I have a template that has an internal property called `'sm'` and it has a user defined type. `'sm'` has an indirect tag binding to a template parameter `'tagPath'` that points to a tag of the same user defined type. `'sm'` has an OPC member tag `'Input'` of type integer. In the root container of the template I have the following propertyChange event defined:

```auto
if event.propertyName == 'sm::Input':
	print 'Input changed', event.newValue

```

When a window containing the template is opened I get the following on the output console:

```auto
Input changed None
Input changed 22
Input changed None
Input changed 22

```

I get the same output on the console each time the window loads even if the value of `'Input'` never changes.

If I do the same thing with an internal property of a standard data type I don’t see this behaviour. It seems to only happen with internal properties of user defined type.

This toggling back and forth is causing issues for my event script. Also since `'Input'` is an OPC tag this is triggering several writes to the tag in the PLC. Some of which are trying to write a value of `None`.
