# Component Disable/Enable

**URL:** <https://forum.inductiveautomation.com/t/component-disable-enable/3991>\
**Category:** Ignition\
**Created:** [February 13, 2012, 6:15pm UTC](https://forum.inductiveautomation.com/t/component-disable-enable/3991 "2012-02-13T18:15:33Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Joseph\_Mendonca](https://avatars.discourse-cdn.com/v4/letter/j/58f4c7/32.png) [@Joseph\_Mendonca](https://forum.inductiveautomation.com/u/Joseph_Mendonca)\
**Post date:** [February 13, 2012, 6:15pm UTC](https://forum.inductiveautomation.com/t/component-disable-enable/3991/1 "2012-02-13T18:15:33Z")

</div>

An error occur, “Cannot assign null to primitive type “int”” which is correct because at that time the components in the container are assigned to a NULL. However, the components in question are all disabled at that time. Is the data connected to the component even when the component is disabled? Should it generate an error?

---

<div class="post-metadata">

**Author:** ![Travis.Cox](https://avatars.discourse-cdn.com/v4/letter/t/b9bd4f/32.png) [@Travis.Cox](https://forum.inductiveautomation.com/u/Travis.Cox)\
**Post date:** [February 13, 2012, 6:59pm UTC](https://forum.inductiveautomation.com/t/component-disable-enable/3991/2 "2012-02-13T18:59:19Z")

</div>

Yes, the binding still occurs even if the component is disabled. For that binding you need to do a null check like this:`coalesce(......., 0)`

---

<div class="post-metadata">

**Author:** ![Joseph\_Mendonca](https://avatars.discourse-cdn.com/v4/letter/j/58f4c7/32.png) [@Joseph\_Mendonca](https://forum.inductiveautomation.com/u/Joseph_Mendonca)\
**Post date:** [February 13, 2012, 8:57pm UTC](https://forum.inductiveautomation.com/t/component-disable-enable/3991/3 "2012-02-13T20:57:43Z")

</div>

The binding is to an indirect tag so it poses a problem. Is it possible to indirectly address a tag in an expression and use the coalesce()?

---

<div class="post-metadata">

**Author:** ![Joseph\_Mendonca](https://avatars.discourse-cdn.com/v4/letter/j/58f4c7/32.png) [@Joseph\_Mendonca](https://forum.inductiveautomation.com/u/Joseph_Mendonca)\
**Post date:** [February 13, 2012, 9:01pm UTC](https://forum.inductiveautomation.com/t/component-disable-enable/3991/4 "2012-02-13T21:01:48Z")

</div>

Got it! Found the solution in the forum. Thanks

---

<div class="post-metadata">

**Author:** ![Joseph\_Mendonca](https://avatars.discourse-cdn.com/v4/letter/j/58f4c7/32.png) [@Joseph\_Mendonca](https://forum.inductiveautomation.com/u/Joseph_Mendonca)\
**Post date:** [February 13, 2012, 9:14pm UTC](https://forum.inductiveautomation.com/t/component-disable-enable/3991/5 "2012-02-13T21:14:54Z")

</div>

It works! 🙂

coalesce(tag(“site” + {Root Container.siteid} + “/alertsetpoint/pressure1hi”), 0)
