# Editing Custom Properties of Templates Through Script

**URL:** <https://forum.inductiveautomation.com/t/editing-custom-properties-of-templates-through-script/86754>\
**Category:** Ignition\
**Tags:** ignition81, scripting, vision\
**Created:** [March 4, 2024, 1:54pm UTC](https://forum.inductiveautomation.com/t/editing-custom-properties-of-templates-through-script/86754 "2024-03-04T13:54:14Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Derek\_Lyons](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/derek_lyons/32/54204_2.png) [@Derek\_Lyons](https://forum.inductiveautomation.com/u/Derek_Lyons)\
**Post date:** [March 4, 2024, 1:54pm UTC](https://forum.inductiveautomation.com/t/editing-custom-properties-of-templates-through-script/86754/1 "2024-03-04T13:54:14Z")

</div>

Hello!

Hoping this will be a simple but having a hard time finding what I need online.

I'm trying to create a pushbutton within a template that will increment/decrement the custom property integer that I created in the template.

Here is what I tried, which worked for OPC tags and such. How can I do this same thing with custom properties in a template?

path = "event.source.parent.Clear\_Numeric\_Input"  
value = system.tag.readBlocking(path)[0].value

if value \< 2:  
print("Only Recipes 1 - 99 available.")  
else:  
system.tag.writeBlocking(path, value - 1)

Thanks!

---

<div class="post-metadata">

**Author:** ![MMaynard](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mmaynard/32/3366_2.png) [@MMaynard](https://forum.inductiveautomation.com/u/MMaynard)\
**Post date:** [March 4, 2024, 2:09pm UTC](https://forum.inductiveautomation.com/t/editing-custom-properties-of-templates-through-script/86754/2 "2024-03-04T14:09:40Z")

</div>

You wouldn't use a tag write for a custom property.  
Just increment the property itself.  
I am assuming Clear\_Numeric\_Input is the custom property name on the template?

`event.source.parent.Clear_Numeric_Input=event.source.parent.Clear_Numeric_Input+1`

---

<div class="post-metadata">

**Author:** ![Derek\_Lyons](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/derek_lyons/32/54204_2.png) [@Derek\_Lyons](https://forum.inductiveautomation.com/u/Derek_Lyons)\
**Post date:** [March 4, 2024, 2:21pm UTC](https://forum.inductiveautomation.com/t/editing-custom-properties-of-templates-through-script/86754/3 "2024-03-04T14:21:37Z")

</div>

Doy, lol I knew it would be something extremely simple. Thank you very much!

---

<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:** [March 4, 2024, 4:42pm UTC](https://forum.inductiveautomation.com/t/editing-custom-properties-of-templates-through-script/86754/4 "2024-03-04T16:42:17Z")

</div>

You should be able to shorten this to:

```auto
event.source.parent.Clear_Numeric_Input+=1

```
