# runScript() in Transaction Expression

**URL:** <https://forum.inductiveautomation.com/t/runscript-in-transaction-expression/36694>\
**Category:** Ignition\
**Tags:** ignition80\
**Created:** [July 14, 2020, 5:56pm UTC](https://forum.inductiveautomation.com/t/runscript-in-transaction-expression/36694 "2020-07-14T17:56:11Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![kaushik.shah](https://avatars.discourse-cdn.com/v4/letter/k/34f0e0/32.png) [@kaushik.shah](https://forum.inductiveautomation.com/u/kaushik.shah)\
**Post date:** [July 14, 2020, 5:56pm UTC](https://forum.inductiveautomation.com/t/runscript-in-transaction-expression/36694/1 "2020-07-14T17:56:11Z")

</div>

Okay,

I have been trying to figure out this function for a while now !

[https://docs.inductiveautomation.com/display/DOC80/runScript](https://docs.inductiveautomation.com/display/DOC80/runScript)

As per this, I should pass each argument in a separate list but that is not the case in the example shown !

Anyways, I have a following function which basically should write 1 to the tag every time transaction expression is true !

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/8/6/864703d966360bb79501c3c7cb18c1554da07233.png)

with the help of this,

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/3/4/348498df1fce1e162be64743e291a9475ba518e2.png)

anything wrong am I doing here ? cause it doesn’t write to that tag.

Thanks

---

<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:** [July 14, 2020, 6:07pm UTC](https://forum.inductiveautomation.com/t/runscript-in-transaction-expression/36694/2 "2020-07-14T18:07:41Z")

</div>

Is your expression tag assigned to a tag group? As is, since the `runScript` expression doesn’t have a poll rate, it’s going to run at most one time, when the expression tag is first created.

---

<div class="post-metadata">

**Author:** ![kaushik.shah](https://avatars.discourse-cdn.com/v4/letter/k/34f0e0/32.png) [@kaushik.shah](https://forum.inductiveautomation.com/u/kaushik.shah)\
**Post date:** [July 14, 2020, 6:11pm UTC](https://forum.inductiveautomation.com/t/runscript-in-transaction-expression/36694/3 "2020-07-14T18:11:20Z")

</div>

> [@paul-griffith](#):
>
> Is your expression tag assigned

It's not an tag. It's triggered expression item of that transaction group which looks something like this.

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

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/d/d/ddd67c41a089f2d6b84e9d8ed27725e785c70219.png)
