# Expression Tag - Error\_ExpressionEval

**URL:** <https://forum.inductiveautomation.com/t/expression-tag-error-expressioneval/87668>\
**Category:** Ignition\
**Tags:** ignition81, perspective, scripting\
**Created:** [March 20, 2024, 11:07pm UTC](https://forum.inductiveautomation.com/t/expression-tag-error-expressioneval/87668 "2024-03-20T23:07:05Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![Transistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/transistor/32/3380_2.png) [@Transistor](https://forum.inductiveautomation.com/u/Transistor)\
**Post date:** [March 21, 2024, 12:58am UTC](https://forum.inductiveautomation.com/t/expression-tag-error-expressioneval/87668/2 "2024-03-21T00:58:33Z")

</div>

I can't see the problem (yet) but here are a few tips:

1. See [Wiki - how to post code on this forum](https://forum.inductiveautomation.com/t/wiki-how-to-post-code-on-this-forum/77831). Yours is almost OK except for the first line.
2. `system.tag.readBlocking()` expects a **list** of tag paths so even when there is only one it should be in `[]` brackets.
3. Since `system.tag.readBlocking` can handle a list you do them all at once.

```auto
    tagPaths = ['xx/ATS-01-PR-A/POS',
                'xx/MPE',
                'xx/MPE_Previous',
                'xx/PE'.
                'xx/RUN'
    ]
    tagValues = system.tag.readBlocking(tagPaths)

```

Your code would then need to reference tagValues[0], etc.

1. You also need `[]` lists on the writeBlocking line.  
`system.tag.writeBlocking([tagPaths[2]], [mpe])`

In current Ignition version the functions work when only one parameter is supplied (not in a list) but it's undocumented and could be "fixed" in the future.

* * *

A further thought - and this might be the problem: The script needs to be on the gateway, not in your project, otherwise the tag event can't find it. Where have you stored the script?

> **[Gateway Event Scripts | Ignition User Manual](https://docs.inductiveautomation.com/docs/8.1/platform/scripting/scripting-in-ignition/gateway-event-scripts#tag-change-scripts)**
>
> Gateway Event Scripts Overview

---

_[View the full topic](https://forum.inductiveautomation.com/t/expression-tag-error-expressioneval/87668)._
