# On propertyChange event ComponentRunning, bound tags are not loading data

**URL:** <https://forum.inductiveautomation.com/t/on-propertychange-event-componentrunning-bound-tags-are-not-loading-data/73656>\
**Category:** Ignition\
**Tags:** vision, ignition81, scripting\
**Created:** [May 12, 2023, 5:16pm UTC](https://forum.inductiveautomation.com/t/on-propertychange-event-componentrunning-bound-tags-are-not-loading-data/73656 "2023-05-12T17:16:34Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Fred\_Reineke](https://avatars.discourse-cdn.com/v4/letter/f/ea5d25/32.png) [@Fred\_Reineke](https://forum.inductiveautomation.com/u/Fred_Reineke)\
**Post date:** [May 12, 2023, 5:16pm UTC](https://forum.inductiveautomation.com/t/on-propertychange-event-componentrunning-bound-tags-are-not-loading-data/73656/1 "2023-05-12T17:16:34Z")

</div>

I have a template that I have created and on window startup I would like the data to populate.

This is my Script in the propertyChange Event under scripting on the template.

CanFeedUDT is a UDT type that is bound in the main window with the different equipment that I want to track. WasherEndWord is a plc tag that is in the UDT structure.

if (event.propertyName == 'componentRunning'):  
print event.source.CanFeedUDT.WasherEndWord

This prints out None for the value of event.source.CanFeedUDT.WasherEndWord, is there a way that I can wait until CanFeedUDT values are loaded before trying to read the data?

---

<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:** [May 12, 2023, 6:13pm UTC](https://forum.inductiveautomation.com/t/on-propertychange-event-componentrunning-bound-tags-are-not-loading-data/73656/2 "2023-05-12T18:13:32Z")

</div>

Instead of looking at the propertyChange for `componentRunning`, which occurs before asynchronous bindings respond (tags and queries), look at the change for the property of interest.

---

<div class="post-metadata">

**Author:** ![Fred\_Reineke](https://avatars.discourse-cdn.com/v4/letter/f/ea5d25/32.png) [@Fred\_Reineke](https://forum.inductiveautomation.com/u/Fred_Reineke)\
**Post date:** [May 12, 2023, 6:54pm UTC](https://forum.inductiveautomation.com/t/on-propertychange-event-componentrunning-bound-tags-are-not-loading-data/73656/3 "2023-05-12T18:54:59Z")

</div>

I can try that, my problem was I could not figure out how to watch for a property change on one tag in the UDT data structure.

---

<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:** [May 12, 2023, 7:05pm UTC](https://forum.inductiveautomation.com/t/on-propertychange-event-componentrunning-bound-tags-are-not-loading-data/73656/4 "2023-05-12T19:05:49Z")

</div>

Ah, that's your problem. Don't use UDT properties.

---

<div class="post-metadata">

**Author:** ![justinedwards.jle](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/justinedwards.jle/32/37854_2.png) [@justinedwards.jle](https://forum.inductiveautomation.com/u/justinedwards.jle)\
**Post date:** [May 12, 2023, 10:04pm UTC](https://forum.inductiveautomation.com/t/on-propertychange-event-componentrunning-bound-tags-are-not-loading-data/73656/5 "2023-05-12T22:04:17Z")

</div>

You could delay the event with [invokeLater](https://docs.inductiveautomation.com/display/DOC81/system.util.invokeLater)

---

<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, 11:18am UTC](https://forum.inductiveautomation.com/t/on-propertychange-event-componentrunning-bound-tags-are-not-loading-data/73656/6 "2023-05-13T11:18:08Z")

</div>

Yet another reason not to use them to add to the list... 😅
