# Ignition template

**URL:** <https://forum.inductiveautomation.com/t/ignition-template/73677>\
**Category:** Ignition\
**Tags:** ignition80\
**Created:** [May 13, 2023, 4:50am UTC](https://forum.inductiveautomation.com/t/ignition-template/73677 "2023-05-13T04:50:55Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ricardo\_javier\_reyes](https://avatars.discourse-cdn.com/v4/letter/r/e9bcb4/32.png) [@Ricardo\_javier\_reyes](https://forum.inductiveautomation.com/u/Ricardo_javier_reyes)\
**Post date:** [May 13, 2023, 4:50am UTC](https://forum.inductiveautomation.com/t/ignition-template/73677/1 "2023-05-13T04:50:55Z")

</div>

I'm having a problem, I want to make a parameterized template where I can, replicate the same thing, but with different tags, but I have problems when making some scripts on a button within the template  
 ![Captura de pantalla 2023-05-12 224644](https://us1.discourse-cdn.com/inductiveautomation/original/3X/4/8/4850d7cf48426cf5e008e4366f516ebf24201555.png)  
I want that when I stop releasing the button, it executes the script, which I am taking from the tamplate property and which has a label, but it throws me an error.  
 ![Captura de pantalla 2023-05-12 225014_2](https://us1.discourse-cdn.com/inductiveautomation/original/3X/6/7/67adda637c3a0531fec539a457b01764cf3ce66f.png)

---

<div class="post-metadata">

**Author:** ![andrews](https://avatars.discourse-cdn.com/v4/letter/a/898d66/32.png) [@andrews](https://forum.inductiveautomation.com/u/andrews)\
**Post date:** [May 13, 2023, 7:16am UTC](https://forum.inductiveautomation.com/t/ignition-template/73677/2 "2023-05-13T07:16:38Z")

</div>

It says the issue is on line 12, but you only provided 3 lines. Please provide full code and use the \</\> to format it.

---

<div class="post-metadata">

**Author:** ![pascal.fragnoud](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pascal.fragnoud/32/24728_2.png) [@pascal.fragnoud](https://forum.inductiveautomation.com/u/pascal.fragnoud)\
**Post date:** [May 13, 2023, 7:17am UTC](https://forum.inductiveautomation.com/t/ignition-template/73677/3 "2023-05-13T07:17:52Z")

</div>

> [@Ricardo\_javier\_reyes](#):
>
> it executes the script, which I am taking from the tamplate property

You're taking a script from the template properties ? I somehow doubt that.

---

<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:** [May 13, 2023, 10:48am UTC](https://forum.inductiveautomation.com/t/ignition-template/73677/4 "2023-05-13T10:48:20Z")

</div>

We have no idea what line 12 is, but assuming it's the first line one your screenshot, you're trying to read a tag with tag path 'event.source.parent.INICIO' which is invalid.  
Python is object oriented. You probably want:

```auto
system.tag.read(event.source.parent.INICIO)

```

However, this function also returns a QualifiedValue, so you will need to read it's `value` property to compare its value to 1. And, if 1 is actually `True`, then you don't need to compare it to anything, you can just use:

```auto
if K.value:
    Dostuff()

```

---

<div class="post-metadata">

**Author:** ![Ricardo\_javier\_reyes](https://avatars.discourse-cdn.com/v4/letter/r/e9bcb4/32.png) [@Ricardo\_javier\_reyes](https://forum.inductiveautomation.com/u/Ricardo_javier_reyes)\
**Post date:** [May 13, 2023, 4:13pm UTC](https://forum.inductiveautomation.com/t/ignition-template/73677/5 "2023-05-13T16:13:58Z")

</div>

I create a property in the template called INICIO, in the button that is inside the template I want it to take the property of the template and be able to compare.  
 ![ignition](https://us1.discourse-cdn.com/inductiveautomation/original/3X/0/3/031c0dd6f0875bdcda4cfa01619e099eba8139ee.png)

I want the template to work with any tag. and can replicate it on multiple screens.

---

<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:** [May 13, 2023, 9:54pm UTC](https://forum.inductiveautomation.com/t/ignition-template/73677/6 "2023-05-13T21:54:57Z")

</div>

You're not passing in the value to write the tag to anything, you need to pass this in as the 2nd arg

Both the inline function hints with ctrl+spacebar and the user manual will tell you how to call functions, don't just assume how to call them
