Property change event on numeric label repeats 3 times

Hi All:

I have a script running on a numeric label that fires on a property change event of that label.

Here is a basic idea what I’m trying to do once the property change event happens:

label1.value = label1.value + 10

However, when the event triggers that script, it does so three times. The numeric label is tied to a ‘minute’ tag from my CLX. Basically wanting to increment a value by n everytime a minute passes but instead I’m getting n x 3. I’m assuming that this event is firing three times but I can’t for the life of me figure out how to only look at it once.

Any help would be appreciated!

Can you post the whole script?

1 Like

Hi! Welcome to the forum!

at the beginning of the script, put in:

print event.propertyName

Then, open up the console (Tools -> Console , or Ctrl+Shift+C), and see what’s firing the script. You’ll see the event really is fired multiple times, from different properties.

Then, when you have the event you really want to look for, use an if statement:

if event.propertyName == 'nameOfTheEvent':
  do_some_stuff
5 Likes

Terrific info Jordan. Did exactly what I needed. Thank you!