# Script executing.. but not writing to tags

**URL:** <https://forum.inductiveautomation.com/t/script-executing-but-not-writing-to-tags/26318>\
**Category:** Ignition\
**Created:** [July 5, 2019, 7:58pm UTC](https://forum.inductiveautomation.com/t/script-executing-but-not-writing-to-tags/26318 "2019-07-05T19:58:22Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![andyg](https://avatars.discourse-cdn.com/v4/letter/a/5f8ce5/32.png) [@andyg](https://forum.inductiveautomation.com/u/andyg)\
**Post date:** [July 5, 2019, 7:58pm UTC](https://forum.inductiveautomation.com/t/script-executing-but-not-writing-to-tags/26318/1 "2019-07-05T19:58:22Z")

</div>

Hi,  
I’ve got a bunch of tag event scripts that used to work. They were basic IF statements, and would write a new value to a tag everytime the value of our MINUTEtag changed.  
All of a sudden, the script is executing, but it is no longer writing values to the tags. everything is in read/write mode,and the script has no errors. I cant figure out why it wont write! any suggestions?

I have attached a test code I wrote to see if it was just those specific tags that were not being written to, but any new tags I create can also not be written to…  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/2X/5/50cd37fb4fa5967be99031eb1898de491f208f67.png)

---

<div class="post-metadata">

**Author:** ![Paullys50](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paullys50/32/3324_2.png) [@Paullys50](https://forum.inductiveautomation.com/u/Paullys50)\
**Post date:** [July 5, 2019, 8:30pm UTC](https://forum.inductiveautomation.com/t/script-executing-but-not-writing-to-tags/26318/2 "2019-07-05T20:30:57Z")

</div>

You are missing a qualifier on your read script.

system.tag.read returns a qualified value, containing 3 parts: value, quality, and timestamp. You need to evaluate the value member.

```auto
if system.tag.read('[.]TEST').value == 6:
    <do something>

```

---

<div class="post-metadata">

**Author:** ![andyg](https://avatars.discourse-cdn.com/v4/letter/a/5f8ce5/32.png) [@andyg](https://forum.inductiveautomation.com/u/andyg)\
**Post date:** [July 5, 2019, 8:41pm UTC](https://forum.inductiveautomation.com/t/script-executing-but-not-writing-to-tags/26318/3 "2019-07-05T20:41:22Z")

</div>

wow… cant believe i forgot that, haha. Thanks for pointing it out. however, even with the corrected script, it isnt writing to the tag. And, the script we have on this project was working perfectly before… writing to tags and everything, then it suddenly stopped. I dont know if there is something that is blocking the tags from being written to or …

---

<div class="post-metadata">

**Author:** ![Paullys50](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paullys50/32/3324_2.png) [@Paullys50](https://forum.inductiveautomation.com/u/Paullys50)\
**Post date:** [July 5, 2019, 8:52pm UTC](https://forum.inductiveautomation.com/t/script-executing-but-not-writing-to-tags/26318/4 "2019-07-05T20:52:48Z")

</div>

Check your use of caps on true

```auto
system.tag.write('[.]LunchHappening', True)

```
