# Scripting to remove error overlays on components

**URL:** <https://forum.inductiveautomation.com/t/scripting-to-remove-error-overlays-on-components/20076>\
**Category:** Ignition\
**Created:** [October 10, 2018, 9:28pm UTC](https://forum.inductiveautomation.com/t/scripting-to-remove-error-overlays-on-components/20076 "2018-10-10T21:28:42Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![mrogers](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mrogers/32/4110_2.png) [@mrogers](https://forum.inductiveautomation.com/u/mrogers)\
**Post date:** [October 10, 2018, 9:28pm UTC](https://forum.inductiveautomation.com/t/scripting-to-remove-error-overlays-on-components/20076/1 "2018-10-10T21:28:42Z")

</div>

I know there is the option to remove overlays on bindings, and I think there’s a scripting function to remove them altogether, but I was wondering if there’s a way to remove them on select components. Sometimes we will put in components for future equipment, but because those usually require a tagpath, and the tagpath we give it doesn’t exist, it has a few overlays. I’d just like to remove those based on a template property or something like that. Anyone have a way to do that?

---

<div class="post-metadata">

**Author:** ![JordanCClark](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/jordancclark/32/83362_2.png) [@JordanCClark](https://forum.inductiveautomation.com/u/JordanCClark)\
**Post date:** [October 11, 2018, 1:37pm UTC](https://forum.inductiveautomation.com/t/scripting-to-remove-error-overlays-on-components/20076/2 "2018-10-11T13:37:06Z")

</div>

Would forceQuality help you out?

[https://docs.inductiveautomation.com/display/DOC79/forceQuality](https://docs.inductiveautomation.com/display/DOC79/forceQuality)

---

<div class="post-metadata">

**Author:** ![mrogers](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mrogers/32/4110_2.png) [@mrogers](https://forum.inductiveautomation.com/u/mrogers)\
**Post date:** [October 11, 2018, 3:11pm UTC](https://forum.inductiveautomation.com/t/scripting-to-remove-error-overlays-on-components/20076/3 "2018-10-11T15:11:53Z")

</div>

I think that may be an option, but it’d be modifying a lot of expressions, and wouldn’t work on some things like direct bindings.

Here’s a thought I just had, haven’t tested it but perhaps if I get all the bindings for a component and its children (recursive) then I can set the property that would normally be set by the binding edit window.

---

<div class="post-metadata">

**Author:** ![MMaynard](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mmaynard/32/3366_2.png) [@MMaynard](https://forum.inductiveautomation.com/u/MMaynard)\
**Post date:** [October 11, 2018, 5:13pm UTC](https://forum.inductiveautomation.com/t/scripting-to-remove-error-overlays-on-components/20076/4 "2018-10-11T17:13:21Z")

</div>

I would just create a dummy set of tags or UDT for the equipment that isn’t installed yet.  
Then you could just point the new controls at a dummy tag set instead of having to modify all of your control structure.

---

<div class="post-metadata">

**Author:** ![mrogers](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mrogers/32/4110_2.png) [@mrogers](https://forum.inductiveautomation.com/u/mrogers)\
**Post date:** [October 11, 2018, 5:34pm UTC](https://forum.inductiveautomation.com/t/scripting-to-remove-error-overlays-on-components/20076/5 "2018-10-11T17:34:49Z")

</div>

Think I solved it. I can just set the quality of each component to good (-1). From my tests so far, they should all update to their correct values when the bindings re-evaluate which is good, so once a real value is put in, it’ll re-evaluate and clear the forced-good qualities.

```auto
def forceQuality(cmp, qInt = -1):
	cmp.setDataQuality(qInt)
	for child in cmp.getComponents():
		forceQuality(child, qInt)

forceQuality(self.parent)	

```
