# Gatewayscript from expression

**URL:** <https://forum.inductiveautomation.com/t/gatewayscript-from-expression/43463>\
**Category:** Ignition\
**Created:** [February 16, 2021, 2:37pm UTC](https://forum.inductiveautomation.com/t/gatewayscript-from-expression/43463 "2021-02-16T14:37:01Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![tom.wouters](https://avatars.discourse-cdn.com/v4/letter/t/d2c977/32.png) [@tom.wouters](https://forum.inductiveautomation.com/u/tom.wouters)\
**Post date:** [February 16, 2021, 2:37pm UTC](https://forum.inductiveautomation.com/t/gatewayscript-from-expression/43463/1 "2021-02-16T14:37:01Z")

</div>

Dear experts,

We have a gateway script that will translate an integer to a string.  
We want to make one general script that does this in case (in the future) new names will be added.

We want to call this script in an expression activated by the onchange value.  
The global script has to return the string name to us.

We tried doing this but no succes. What is the correct way to return something from a global script?

In attachment we tried it using that way.

 ![Tag.PNG](https://us1.discourse-cdn.com/inductiveautomation/original/3X/3/b/3b5a95dcb8c8de2afe05f186bf36f6057bd71ea3.jpeg)

---

<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:** [February 16, 2021, 3:00pm UTC](https://forum.inductiveautomation.com/t/gatewayscript-from-expression/43463/2 "2021-02-16T15:00:11Z")

</div>

try adding a return to your script

```auto
return RecipeName

```

Then in the your `valueChanged` script

```auto
Recept = project.PT_Recipe.RecipeName(currentValue.value,Recept)
...

```
