# Error on Expression Tag, runScript not working

**URL:** <https://forum.inductiveautomation.com/t/error-on-expression-tag-runscript-not-working/31165>\
**Category:** Ignition\
**Tags:** ignition79, ignition80, scripting\
**Created:** [January 8, 2020, 9:18pm UTC](https://forum.inductiveautomation.com/t/error-on-expression-tag-runscript-not-working/31165 "2020-01-08T21:18:07Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![cesrom](https://avatars.discourse-cdn.com/v4/letter/c/ea666f/32.png) [@cesrom](https://forum.inductiveautomation.com/u/cesrom)\
**Post date:** [January 8, 2020, 9:18pm UTC](https://forum.inductiveautomation.com/t/error-on-expression-tag-runscript-not-working/31165/1 "2020-01-08T21:18:07Z")

</div>

Recently one of the developers on my team reported a potential issue with an Expression Tag running a project scripting function.

I have tried this on version 7.9.12 and 8.0.6, and both show the following for Quality on the Tag:

7.9.12: Evaluation Error  
8.0.6: Error\_ExpressionEval(“Error executing script for runScript() expression:scales.test”)

Additionally on 8.0.6 the “Last published value” of the Tag under Diagnostics has the following value:  
[null, Error\_ExpressionEval(“Error executing script for runScript() expression:scales.test”), Wed Jan 08 21:44:30 CET 2020 (1578516270254)

The test function looks like this:

```auto
def test():
    return True

```

Binding that function to a Check Box’s Selected property works fine, but binding to an Expression Tag does not.

What are we missing?

Thanks.

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [January 8, 2020, 9:19pm UTC](https://forum.inductiveautomation.com/t/error-on-expression-tag-runscript-not-working/31165/2 "2020-01-08T21:19:27Z")

</div>

Where’s the script defined? An expression tag does not belong to a project, so in 7.9 you’d have to define it in the global area, and in 8.0.6 you’d have to define it in whatever project has been designated as the “Gateway Scripting Project” in the gateway settings.

---

<div class="post-metadata">

**Author:** ![cesrom](https://avatars.discourse-cdn.com/v4/letter/c/ea666f/32.png) [@cesrom](https://forum.inductiveautomation.com/u/cesrom)\
**Post date:** [January 8, 2020, 9:20pm UTC](https://forum.inductiveautomation.com/t/error-on-expression-tag-runscript-not-working/31165/3 "2020-01-08T21:20:50Z")

</div>

Oh!

I had forgotten about that entirely.

Thanks, Kevin!

---

<div class="post-metadata">

**Author:** ![cesrom](https://avatars.discourse-cdn.com/v4/letter/c/ea666f/32.png) [@cesrom](https://forum.inductiveautomation.com/u/cesrom)\
**Post date:** [January 8, 2020, 9:33pm UTC](https://forum.inductiveautomation.com/t/error-on-expression-tag-runscript-not-working/31165/4 "2020-01-08T21:33:18Z")

</div>

How should we call the **test** function of the Gateway Scripting Project from another project?

Thanks again.

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [January 8, 2020, 9:45pm UTC](https://forum.inductiveautomation.com/t/error-on-expression-tag-runscript-not-working/31165/5 "2020-01-08T21:45:27Z")

</div>

In 8.0 you can only do that if the other project inherits from the Gateway Scripting Project.

On an upgrade the default setup is that we move all the old globally scoped stuff to an inheritable project called “global” and then make all your other projects inherit from “global” by default.

An upgrade should also set the Gateway Scripting Project to this “global” project.
