# Run runScript from a expresion tag

**URL:** <https://forum.inductiveautomation.com/t/run-runscript-from-a-expresion-tag/12477>\
**Category:** General Discussion\
**Created:** [December 19, 2016, 3:00pm UTC](https://forum.inductiveautomation.com/t/run-runscript-from-a-expresion-tag/12477 "2016-12-19T15:00:50Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![CuninganReset](https://avatars.discourse-cdn.com/v4/letter/c/f6c823/32.png) [@CuninganReset](https://forum.inductiveautomation.com/u/CuninganReset)\
**Post date:** [December 19, 2016, 3:00pm UTC](https://forum.inductiveautomation.com/t/run-runscript-from-a-expresion-tag/12477/1 "2016-12-19T15:00:50Z")

</div>

Hello.

I am trying to run a script placed on project script library using expressionrunScript()

i create a new expression tag and insert this code into the expresion:

```auto
runScript(project.lib.retorna1(),1000)
```

But the Tag fault with “Evaluation Error”

I do not know what i am doind bad.

The function only returns a 1.0 like this:

```auto
def retorna1():
	return(float(1.0))
```

Can anyone help me?

---

<div class="post-metadata">

**Author:** ![MMaynard](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mmaynard/32/3366_2.png) [@MMaynard](https://forum.inductiveautomation.com/u/MMaynard)\
**Post date:** [December 19, 2016, 4:15pm UTC](https://forum.inductiveautomation.com/t/run-runscript-from-a-expresion-tag/12477/2 "2016-12-19T16:15:24Z")

</div>

you need quotes around your script path

```auto
runScript("project.lib.retorna1()",1000)
```

---

<div class="post-metadata">

**Author:** ![CuninganReset](https://avatars.discourse-cdn.com/v4/letter/c/f6c823/32.png) [@CuninganReset](https://forum.inductiveautomation.com/u/CuninganReset)\
**Post date:** [December 22, 2016, 8:36am UTC](https://forum.inductiveautomation.com/t/run-runscript-from-a-expresion-tag/12477/3 "2016-12-22T08:36:37Z")

</div>

Hello, thanks for the help.

I have no luck with this, maybe the Gateway hates me or do not know ☹

[attachment=3]Picture 2016-12-22 09\_27\_02.png[/attachment]  
[attachment=2]Picture 2016-12-22 09\_27\_10.png[/attachment]  
[attachment=1]Picture 2016-12-22 09\_30\_21.png[/attachment]  
[attachment=0]Picture 2016-12-22 09\_30\_59.png[/attachment]

I really do not know what i am doing incorrectly.

Do you see something??

---

<div class="post-metadata">

**Author:** ![CuninganReset](https://avatars.discourse-cdn.com/v4/letter/c/f6c823/32.png) [@CuninganReset](https://forum.inductiveautomation.com/u/CuninganReset)\
**Post date:** [December 22, 2016, 10:06am UTC](https://forum.inductiveautomation.com/t/run-runscript-from-a-expresion-tag/12477/4 "2016-12-22T10:06:43Z")

</div>

Hello.

Ok, it works, but you need to write your scripts in global shared library, not on project library.

Someone must edit the documentation and add this little detail…

Talking about tags, in project windows work correctly.

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [December 23, 2016, 6:39pm UTC](https://forum.inductiveautomation.com/t/run-runscript-from-a-expresion-tag/12477/5 "2016-12-23T18:39:18Z")

</div>

Called project scripts will not work from expression tags because tags are Gateway-scoped, meaning they don’t have access to project-scoped resources.
