propertyChange in a template

I’m using a propertyChange in a template, the problem that I’m that this script executes when opening the window where the template is located.

‘value’ is the value of a ‘numeric label component’

if event.propertyName=='value':

can someone help me to fix this. thanks

What is the problem? Every bound property changes on startup (window or template) when the initial value arrives.

if event.propertyName == 'value' and not event.propertyName == 'componentRunning':
	event.source.parent.getComponent('Timer').running = 1

Not going to work, the OP is already filtering out componentRunning events; those two conditions are by definition mutually exclusive as all events happen independent of one another

Yeah, I see what you are saying about the mutual exclusion.

I forgot to say that I have not associated any udt to the template. I associate the value with a parameter, in which from a window I paste the path of the tag.

I have made a test of associating a udt with the template, and associating the value with the property of the udt, now the script is not executed every time I open the window where the template is, but every time I access the application from the client ( much better than in the previous case).

is there a way to ignore the initial value that the template has?
Thank you very much everyone for the help.

This may help

1 Like

I followed the instructions but without result. I’m going to keep trying. any other solution is appreciated. thanks you

Have You,already, fixed it?

not yet

@pturmel you can upload a project where it shows an example, thanks you