# propertyChange Events script posibilities

**URL:** <https://forum.inductiveautomation.com/t/propertychange-events-script-posibilities/12829>\
**Category:** Ignition\
**Created:** [March 22, 2017, 12:24pm UTC](https://forum.inductiveautomation.com/t/propertychange-events-script-posibilities/12829 "2017-03-22T12:24:44Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![roshanbhosale](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/roshanbhosale/32/4899_2.png) [@roshanbhosale](https://forum.inductiveautomation.com/u/roshanbhosale)\
**Post date:** [March 22, 2017, 12:24pm UTC](https://forum.inductiveautomation.com/t/propertychange-events-script-posibilities/12829/1 "2017-03-22T12:24:44Z")

</div>

Hi everyone…

I have doubt about propertyChange Events.

can i use the below code?..

`if event.propertyName == "MODULE_REDU_STAT" or event.propertyName == "CHASIS_ID":
`

---

<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 22, 2017, 1:46pm UTC](https://forum.inductiveautomation.com/t/propertychange-events-script-posibilities/12829/2 "2017-03-22T13:46:33Z")

</div>

Yes, that is valid syntax. When checking multiple possibilities, I usually use the ‘in’ operator with a tuple to make it more readable. Like so:`if event.propertyName in ("MODULE_REDU_STAT","CHASIS_ID"):
   ....whatever....`Just be aware that you can’t use event.newValue and event.oldValue unconditionally in such code.

---

<div class="post-metadata">

**Author:** ![roshanbhosale](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/roshanbhosale/32/4899_2.png) [@roshanbhosale](https://forum.inductiveautomation.com/u/roshanbhosale)\
**Post date:** [March 23, 2017, 6:05am UTC](https://forum.inductiveautomation.com/t/propertychange-events-script-posibilities/12829/3 "2017-03-23T06:05:01Z")

</div>

Thank you pturmel for the reply…

as you said not to use event.oldValue or event.newValue, can you tell me how i can use properties “MODULE\_REDU\_STAT”,“CHASIS\_ID” in the code suppose i want to check the value on it. (both are integer tag)

---

<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 23, 2017, 11:56am UTC](https://forum.inductiveautomation.com/t/propertychange-events-script-posibilities/12829/4 "2017-03-23T11:56:07Z")

</div>

[quote=“roshanbhosale”]as you said not to use event.oldValue or event.newValue, can you tell me how i can use properties “MODULE\_REDU\_STAT”,“CHASIS\_ID” in the code suppose i want to check the value on it.[/quote]`.... event.source.MODULE_REDU_STAT ....
.... event.source.CHASIS_ID ....`[quote=“roshanbhosale”](both are integer tag)[/quote]Uhhm. I hope you meant integer property, that is, a custom property on the component where you are using the event script. This only applies to property names in the specific component (the scripting name of the property, if looking at a built-in property).

---

<div class="post-metadata">

**Author:** ![roshanbhosale](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/roshanbhosale/32/4899_2.png) [@roshanbhosale](https://forum.inductiveautomation.com/u/roshanbhosale)\
**Post date:** [March 23, 2017, 12:15pm UTC](https://forum.inductiveautomation.com/t/propertychange-events-script-posibilities/12829/5 "2017-03-23T12:15:00Z")

</div>

YES pturmel… i meant integer property…thank you for your help… 🙂
