# Expression Tag cannot execute runScript() using Gateway Scripting Project (Ignition 8.1.50)

**URL:** <https://forum.inductiveautomation.com/t/expression-tag-cannot-execute-runscript-using-gateway-scripting-project-ignition-8-1-50/112738>\
**Category:** Ignition\
**Tags:** perspective, ignition81, scripting\
**Created:** [December 10, 2025, 5:40pm UTC](https://forum.inductiveautomation.com/t/expression-tag-cannot-execute-runscript-using-gateway-scripting-project-ignition-8-1-50/112738 "2025-12-10T17:40:27Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![italogustavoaraujo](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/italogustavoaraujo/32/55235_2.png) [@italogustavoaraujo](https://forum.inductiveautomation.com/u/italogustavoaraujo)\
**Post date:** [December 10, 2025, 5:40pm UTC](https://forum.inductiveautomation.com/t/expression-tag-cannot-execute-runscript-using-gateway-scripting-project-ignition-8-1-50/112738/1 "2025-12-10T17:40:27Z")

</div>

Hi everyone,

I'm running Ignition **8.1.50** and I'm having trouble using a script function inside an **Expression Tag**.

### **Setup**

- I have a **Gateway Scripting Project** configured (a global project).

- Inside that project, I created a script in `project.Funcs_Util`.

- If I call the function through the Script Console, it works correctly.

- The script simply returns a string.

Example:

`def formatarTitulo():`  
` return "Hello World"`

**What I'm trying to do**

Inside a **String Expression Tag** , I'm trying to call the script like this:

`runScript("project.Funcs_Util.formatarTitulo")`

**Problem**

The Expression Tag shows the error **Error\_ExpressionEval** and does not execute the script at all.

It looks like the Expression Tag can **validate** the syntax (Designer editor accepts it), but during runtime the script is not executed.

### **What I already checked**

- The Gateway Scripting Project is correctly set in Project Properties.

- The script runs normally when called from:

- Only the **Expression Tag** fails to execute `runScript`.

### **Question**

Is `runScript()` supported inside **Expression Tags** in Ignition 8.1.50?  
If not, what is the recommended approach to call shared project scripts from tags?

Should I move the logic to:

- A Tag Change Script?

- A Gateway Timer Script that writes to the tag?

- A Tag Event Script?

Or is there any setting that allows Expression Tags to call Gateway scripts directly?

Any guidance would be appreciated!

Thanks in advance.

---

<div class="post-metadata">

**Author:** ![dkhayes117](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/dkhayes117/32/68344_2.png) [@dkhayes117](https://forum.inductiveautomation.com/u/dkhayes117)\
**Post date:** [December 10, 2025, 5:54pm UTC](https://forum.inductiveautomation.com/t/expression-tag-cannot-execute-runscript-using-gateway-scripting-project-ignition-8-1-50/112738/2 "2025-12-10T17:54:46Z")

</div>

Use `runScript` sparingly, and only when the execution is in the single digit millis. Otherwise, you can stall other tags from running by blocking a tag execution thread.

It's far better to setup a gateway tag change, timer, or scheduled script to run the project script then write to the tag.

I can't debug why the script is not running without the code, but it probably has to do with scoping. I.E. trying to run a named query in the gateway scope without a project name provided.

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [December 10, 2025, 6:10pm UTC](https://forum.inductiveautomation.com/t/expression-tag-cannot-execute-runscript-using-gateway-scripting-project-ignition-8-1-50/112738/3 "2025-12-10T18:10:09Z")

</div>

~~Have you saved the project? The designer script console will run unsaved scripts, but the gateway cannot.~~

_You already confirmed with Perspective and Tag Change Events._

Look for entries in the gateway log.

Also what Daniel said about project name issues.

---

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [December 12, 2025, 4:16pm UTC](https://forum.inductiveautomation.com/t/expression-tag-cannot-execute-runscript-using-gateway-scripting-project-ignition-8-1-50/112738/4 "2025-12-12T16:16:20Z")

</div>

You should see the error in the diagnostics on the tag itself as well.

> [@italogustavoaraujo](#):
>
> If not, what is the recommended approach to call shared project scripts from tags?
> 
> Should I move the logic to:
> 
> - A Tag Change Script?
> - A Gateway Timer Script that writes to the tag?
> - A Tag Event Script?

This depends what your script will be doing after it says hello
