# Using a Tagpath as a variable in a Expression

**URL:** <https://forum.inductiveautomation.com/t/using-a-tagpath-as-a-variable-in-a-expression/115015>\
**Category:** Ignition\
**Created:** [April 10, 2026, 10:55pm UTC](https://forum.inductiveautomation.com/t/using-a-tagpath-as-a-variable-in-a-expression/115015 "2026-04-10T22:55:38Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![stephen](https://avatars.discourse-cdn.com/v4/letter/s/96bed5/32.png) [@stephen](https://forum.inductiveautomation.com/u/stephen)\
**Post date:** [April 10, 2026, 10:55pm UTC](https://forum.inductiveautomation.com/t/using-a-tagpath-as-a-variable-in-a-expression/115015/1 "2026-04-10T22:55:38Z")

</div>

Hi All

I am learning ignition and am trying to do something to simplify repeat object. In this case, I have 10 x labels that I want to link to 10 x tags. I am trying to avoid (if possible) having to link each one manually so set their name to “LinkTag\_0”, “LinkTag\_1” ect and they need to link to a mamory tag formatted “[default]SC\_Track/LinkedTag 0/ItemID”

I have had some partial success with a script:

```python
def transform(self, value, quality, timestamp):
	name = self.meta.name.replace("LinkTag_", "")
	return system.tag.readBlocking(["[default]SC_Track/LinkedTag {}/ItemID".format(name)])[0].value

```

This script sets the value but when I change my memory tag, it doesn’t update my label. Is there a better way to handle this?

The reason behind this is that the plan is to have multiple objects on screen, each linked to a set of tags, but I am trying to avoid having to setup multiple links against these.

Hope this makes sens

S

---

<div class="post-metadata">

**Author:** ![Sanganak\_Kasare](https://avatars.discourse-cdn.com/v4/letter/s/8c91f0/32.png) [@Sanganak\_Kasare](https://forum.inductiveautomation.com/u/Sanganak_Kasare)\
**Post date:** [April 11, 2026, 3:30am UTC](https://forum.inductiveautomation.com/t/using-a-tagpath-as-a-variable-in-a-expression/115015/2 "2026-04-11T03:30:10Z")

</div>

Given the script is used to only read the value of one tag I would recommend using an indirect tag binding. If you want this setup to read and write I will make the binding bidirectional.

Bit something like this (check the Bidirectional checkbox if you want to read and write to that tag).

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

With an indirect tag binding you can build the tag path dynamically. You can find more info here: [Tag Bindings in Perspective | Ignition User Manual](https://www.docs.inductiveautomation.com/docs/8.1/ignition-modules/perspective/working-with-perspective-components/bindings-in-perspective/tag-bindings-in-perspective#indirect-tag-binding-mode)

Script transforms in Ignition are **event-driven** , not continuously evaluated. This distinction is key to understanding why your value did not update and why the script did not re‑run when you manually changed the memory tag.

A script transform only executes **when one of its input values changes**. What counts as an “input” depends entirely on how the binding is configured:

- If you are using an **expression binding with a script transform** , the script transform will only run when **any input referenced by the expression changes**.
- If you are using a **property binding or tag binding followed by a script transform** , the script transform will only run when **that bound property or tag value changes**.

In your case, changing the value of a memory tag did not cause the script transform to re-run because that memory tag was **not part of the binding’s input path**. Simply referencing other tags or custom properties inside the script body does **not** make them inputs. Ignition does not track values that are read imperatively inside the script.

---

<div class="post-metadata">

**Author:** ![stephen](https://avatars.discourse-cdn.com/v4/letter/s/96bed5/32.png) [@stephen](https://forum.inductiveautomation.com/u/stephen)\
**Post date:** [April 11, 2026, 6:23am UTC](https://forum.inductiveautomation.com/t/using-a-tagpath-as-a-variable-in-a-expression/115015/3 "2026-04-11T06:23:14Z")

</div>

Thanks, that worked exactly as I was hoping!
