# runScript expression with Indirect tag(custom property)

**URL:** <https://forum.inductiveautomation.com/t/runscript-expression-with-indirect-tag-custom-property/24685>\
**Category:** Ignition\
**Created:** [May 6, 2019, 1:02pm UTC](https://forum.inductiveautomation.com/t/runscript-expression-with-indirect-tag-custom-property/24685 "2019-05-06T13:02:36Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![leeroy](https://avatars.discourse-cdn.com/v4/letter/l/eb9ed0/32.png) [@leeroy](https://forum.inductiveautomation.com/u/leeroy)\
**Post date:** [May 6, 2019, 1:02pm UTC](https://forum.inductiveautomation.com/t/runscript-expression-with-indirect-tag-custom-property/24685/1 "2019-05-06T13:02:36Z")

</div>

Hi , i’m trying to use the run script function with an argument that as a custom properties. it’s not working i’m missing something but don’t know what.

**here is the script**  
runScript(“shared.backgroundcolor.backgroundcolor”, 0, tag("[Master\_par\_Tags]Batching/A220/AGT SPT/AGT"+{Root Container.monIndex}+“ _PLC/SPT\_1_ ”))

I tried also like this  
runScript(“shared.backgroundcolor.backgroundcolor”, 0, (tag("[Master\_par\_Tags]Batching/A220/AGT SPT/AGT"+{Root Container.monIndex}+“ _PLC/SPT\_1_ ”)))

Please note that {Root Container.monIndex} is binded with the value of a slider.

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:** [May 7, 2019, 4:27pm UTC](https://forum.inductiveautomation.com/t/runscript-expression-with-indirect-tag-custom-property/24685/2 "2019-05-07T16:27:51Z")

</div>

Where are you using this `runScript` expression? If you’re trying to use this in an expression tag, it won’t work because tags run “globally” on the gateway, and don’t have any knowledge of your containers or clients. Your syntax looks fine, so I suspect that’s the problem.

---

<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:** [May 7, 2019, 4:31pm UTC](https://forum.inductiveautomation.com/t/runscript-expression-with-indirect-tag-custom-property/24685/3 "2019-05-07T16:31:46Z")

</div>

Wrap the reference to monIndex in a `toStr()` function so your concatenation will work.

Also, strongly consider using another custom property to use with Indirect Tag Binding instead of using the `tag()` expression function. More efficient and easier to maintain.
