# Scripting Help to Enable Popup Window Based off Tag Quality

**URL:** <https://forum.inductiveautomation.com/t/scripting-help-to-enable-popup-window-based-off-tag-quality/12150>\
**Category:** General Discussion\
**Created:** [September 22, 2016, 11:40am UTC](https://forum.inductiveautomation.com/t/scripting-help-to-enable-popup-window-based-off-tag-quality/12150 "2016-09-22T11:40:55Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![RSTechShannon](https://avatars.discourse-cdn.com/v4/letter/r/f05b48/32.png) [@RSTechShannon](https://forum.inductiveautomation.com/u/RSTechShannon)\
**Post date:** [September 22, 2016, 11:40am UTC](https://forum.inductiveautomation.com/t/scripting-help-to-enable-popup-window-based-off-tag-quality/12150/1 "2016-09-22T11:40:55Z")

</div>

I was wondering if someone could give me an example of the scripting that would be required to have a popup window appear when I lose communications to my PLC or if a specific tag’s quality is not good.

I have been trying to do an event script that if my PLC tag “Comm\_Error” loses its data quality, then my popup window “PopupCommError” would open but have been having no success. I’ve had no issues enabling popups based off of a tag’s value change but I’m obviously missing something when it comes to enabling based off of data quality.

I’m pretty new to scripting and so any suggestions or help would be appreciated.

---

<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:** [September 22, 2016, 5:35pm UTC](https://forum.inductiveautomation.com/t/scripting-help-to-enable-popup-window-based-off-tag-quality/12150/2 "2016-09-22T17:35:03Z")

</div>

Below are screenshots of a quick Client Tag Change Script I did using our heartbeat tag.  
[attachment=1]tagQualityScript1.PNG[/attachment]

[attachment=0]tagQualityScript2.PNG[/attachment]

---

<div class="post-metadata">

**Author:** ![RSTechShannon](https://avatars.discourse-cdn.com/v4/letter/r/f05b48/32.png) [@RSTechShannon](https://forum.inductiveautomation.com/u/RSTechShannon)\
**Post date:** [September 23, 2016, 11:19am UTC](https://forum.inductiveautomation.com/t/scripting-help-to-enable-popup-window-based-off-tag-quality/12150/3 "2016-09-23T11:19:16Z")

</div>

Thank you MMaynardUSG.

Your Line 2 in the script looks to be exactly what I wasn’t doing right. I will find out Monday when I’m back to work.

---

<div class="post-metadata">

**Author:** ![RSTechShannon](https://avatars.discourse-cdn.com/v4/letter/r/f05b48/32.png) [@RSTechShannon](https://forum.inductiveautomation.com/u/RSTechShannon)\
**Post date:** [September 26, 2016, 12:47pm UTC](https://forum.inductiveautomation.com/t/scripting-help-to-enable-popup-window-based-off-tag-quality/12150/4 "2016-09-26T12:47:32Z")

</div>

That worked just as I had hoped. Thank you.

---

<div class="post-metadata">

**Author:** ![Nelly](https://avatars.discourse-cdn.com/v4/letter/n/ed8c4c/32.png) [@Nelly](https://forum.inductiveautomation.com/u/Nelly)\
**Post date:** [October 21, 2017, 10:30pm UTC](https://forum.inductiveautomation.com/t/scripting-help-to-enable-popup-window-based-off-tag-quality/12150/6 "2017-10-21T22:30:55Z")

</div>

Hi, How do i see your attachments please?  
REgards  
Neil
