# Expression Tag runScript

**URL:** <https://forum.inductiveautomation.com/t/expression-tag-runscript/92205>\
**Category:** Ignition\
**Tags:** ignition81, perspective\
**Created:** [June 21, 2024, 12:17pm UTC](https://forum.inductiveautomation.com/t/expression-tag-runscript/92205 "2024-06-21T12:17:23Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Pat\_Cunningham](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pat_cunningham/32/57710_2.png) [@Pat\_Cunningham](https://forum.inductiveautomation.com/u/Pat_Cunningham)\
**Post date:** [June 21, 2024, 12:17pm UTC](https://forum.inductiveautomation.com/t/expression-tag-runscript/92205/1 "2024-06-21T12:17:23Z")

</div>

Can someone please explain why this wont work in an Expression Tag?

![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/c/9/c9f4ef21f30ca32ad24c78a70b0a7a803a2dc8a0.png)  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/3/5/35251f4208447d6208ed16622f3412fb4d507051.png)

---

<div class="post-metadata">

**Author:** ![bkarabinchak.psi](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bkarabinchak.psi/32/83567_2.png) [@bkarabinchak.psi](https://forum.inductiveautomation.com/u/bkarabinchak.psi)\
**Post date:** [June 21, 2024, 12:20pm UTC](https://forum.inductiveautomation.com/t/expression-tag-runscript/92205/2 "2024-06-21T12:20:01Z")

</div>

This is on a gateway tag I am guessing? Gateway tags are project agnostic - this is running on the gateway without any knowledge of what project `display.test` is supposed to be in. I think you will need to configure this under gateway settings

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/0/6/06b5c2f21ec6c6b46dbcb006cbc1a9b84078dbaf.png)

It's always helpful if you can provide the error message you are getting though as well.

---

<div class="post-metadata">

**Author:** ![lrose](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/lrose/32/62724_2.png) [@lrose](https://forum.inductiveautomation.com/u/lrose)\
**Post date:** [June 21, 2024, 12:27pm UTC](https://forum.inductiveautomation.com/t/expression-tag-runscript/92205/3 "2024-06-21T12:27:38Z")

</div>

Any script intended to be run in a tag, through expression or otherwise, must be in the Gateway Scripting Project.

---

<div class="post-metadata">

**Author:** ![Pat\_Cunningham](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pat_cunningham/32/57710_2.png) [@Pat\_Cunningham](https://forum.inductiveautomation.com/u/Pat_Cunningham)\
**Post date:** [June 21, 2024, 12:59pm UTC](https://forum.inductiveautomation.com/t/expression-tag-runscript/92205/4 "2024-06-21T12:59:32Z")

</div>

Thank you.

---

<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:** [July 26, 2024, 5:13am UTC](https://forum.inductiveautomation.com/t/expression-tag-runscript/92205/5 "2024-07-26T05:13:14Z")

</div>

~~(also, `display.test` will return a reference to the function object itself, this will not _execute_ it and return the return from the function itself. You'll need to _call_ the function with `display.test()`)~~

---

<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:** [July 26, 2024, 11:48am UTC](https://forum.inductiveautomation.com/t/expression-tag-runscript/92205/6 "2024-07-26T11:48:38Z")

</div>

> [@nminchin](#):
>
> will not _execute_ it and return the return from the function itself

Actually, no, `runScript` special-cases this to trigger argument passing mode. It will indeed run bare function arguments.
