runScript expression with Indirect tag(custom property)

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

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.

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.