Ignition template

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
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

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

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

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:

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:

if K.value:
    Dostuff()

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

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

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