# Trouble w/ custom properties in template binding expressions

**URL:** <https://forum.inductiveautomation.com/t/trouble-w-custom-properties-in-template-binding-expressions/105116>\
**Category:** Ignition\
**Tags:** ignition81, vision\
**Created:** [April 15, 2025, 2:33pm UTC](https://forum.inductiveautomation.com/t/trouble-w-custom-properties-in-template-binding-expressions/105116 "2025-04-15T14:33:15Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![gschettler](https://avatars.discourse-cdn.com/v4/letter/g/bbe5ce/32.png) [@gschettler](https://forum.inductiveautomation.com/u/gschettler)\
**Post date:** [April 15, 2025, 2:33pm UTC](https://forum.inductiveautomation.com/t/trouble-w-custom-properties-in-template-binding-expressions/105116/1 "2025-04-15T14:33:15Z")

</div>

Hi all,

I'm using ignition edge 8.1 and creating a template for a robot. I have a Label that I would like to copy and paste multiple times and was hoping to change the label text using a generic binding expression and a single custom property (string type) named 'index'.

Currently, using no custom properties, I just use:

"2. " + tag({EpsonRobot.RobotTagPath} + "/HMI/LocalName/LocalName2")

I then created my custom property and assigned it a value of 2 (again, string type) in order to replace the 2's in the expression above. I created my new expression:

{this.index} + ". " + tag({EpsonRobot.RobotTagPath} + "/HMI/LocalName/LocalName" + {this.index})

Currently this is not working at all. I'm very new to Ignition but have seen syntax like {this.index} used in a similar ways other places. I feel like I'm missing something...can you not use custom properties in binding expressions?

---

<div class="post-metadata">

**Author:** ![vtran](https://avatars.discourse-cdn.com/v4/letter/v/779978/32.png) [@vtran](https://forum.inductiveautomation.com/u/vtran)\
**Post date:** [April 15, 2025, 3:26pm UTC](https://forum.inductiveautomation.com/t/trouble-w-custom-properties-in-template-binding-expressions/105116/2 "2025-04-15T15:26:22Z")

</div>

if index is a custom property of the label, try `{this.custom.index}` instead

---

<div class="post-metadata">

**Author:** ![ryan.white](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/ryan.white/32/73193_2.png) [@ryan.white](https://forum.inductiveautomation.com/u/ryan.white)\
**Post date:** [April 15, 2025, 3:29pm UTC](https://forum.inductiveautomation.com/t/trouble-w-custom-properties-in-template-binding-expressions/105116/3 "2025-04-15T15:29:49Z")

</div>

Is this in Vision or Perspective?

As a general rule of thumb, never use `tag` in a visual/interface setting. It should only be used in expression tags.

Instead, use an indirect binding to dynamically build the path and fetch the tag value.

> **[Indirect Tag Bindings in Vision | Ignition User Manual](https://www.docs.inductiveautomation.com/docs/8.1/ignition-modules/vision/binding-types-in-vision/indirect-tag-bindings-in-vision)**
>
> Binding Properties to a Dynamic Set of Tags

> **[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)**
>
> A Tag binding is a straight-forward binding type. It simply binds a property directly to a Tag Property (typically the value). This sets up a subscription for that Tag. Every time the chosen Tag changes, the binding is evaluated and pushes the new...

Consider working your way through [Inductive University](https://inductiveuniversity.com/), its completely free and covers a lot of the basics.

---

<div class="post-metadata">

**Author:** ![gschettler](https://avatars.discourse-cdn.com/v4/letter/g/bbe5ce/32.png) [@gschettler](https://forum.inductiveautomation.com/u/gschettler)\
**Post date:** [April 15, 2025, 3:51pm UTC](https://forum.inductiveautomation.com/t/trouble-w-custom-properties-in-template-binding-expressions/105116/4 "2025-04-15T15:51:02Z")

</div>

Hi Ryan,

This is in Vision.

If I were to use the indirect tag method like you're saying, then I would not be able to concatenate the "1. ", "2. ", etc. in a single label, no? Are you saying that should be a separate label? I guess the more general form of the question would be: if you ever have a case where you don't want to bind it to the tag value but rather use the tag value as part of the expression in the binding, then what would the preferred method be?

---

<div class="post-metadata">

**Author:** ![ryan.white](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/ryan.white/32/73193_2.png) [@ryan.white](https://forum.inductiveautomation.com/u/ryan.white)\
**Post date:** [April 15, 2025, 3:53pm UTC](https://forum.inductiveautomation.com/t/trouble-w-custom-properties-in-template-binding-expressions/105116/5 "2025-04-15T15:53:27Z")

</div>

> [@gschettler](#):
>
> tag value as part of the expression in the binding

One custom property with an indirect binding to hold the tag value that you want to use in the label display. This property could be on the label or on the template root.

Then on the label text have a binding of `{self.index} + '.' + {self.tagValue}`.

The indirect binding would look something like` {1}/HMI/LocalName/LocalName{2}` with the two sources being `{EpsonRobot.RobotTagPath}` and `{self.index}`

Also, vision components reference themselves using `self`, perspective components use `this`.

---

<div class="post-metadata">

**Author:** ![gschettler](https://avatars.discourse-cdn.com/v4/letter/g/bbe5ce/32.png) [@gschettler](https://forum.inductiveautomation.com/u/gschettler)\
**Post date:** [April 15, 2025, 3:53pm UTC](https://forum.inductiveautomation.com/t/trouble-w-custom-properties-in-template-binding-expressions/105116/6 "2025-04-15T15:53:39Z")

</div>

Unfortunately, this does not work either. Sounds like Ryan is telling me I may not being using the correct approach in general. Thanks!

---

<div class="post-metadata">

**Author:** ![gschettler](https://avatars.discourse-cdn.com/v4/letter/g/bbe5ce/32.png) [@gschettler](https://forum.inductiveautomation.com/u/gschettler)\
**Post date:** [April 15, 2025, 4:27pm UTC](https://forum.inductiveautomation.com/t/trouble-w-custom-properties-in-template-binding-expressions/105116/7 "2025-04-15T16:27:35Z")

</div>

Okay, great to know about the 'self' vs. 'this'!

So, I created two custom properties:  
index - string type  
tagValue - string type

For tagValue, I did an indirect tag binding. Reference {1} took the EpsonRobot.RobotTagPath no problem. However, for Reference {2}, it does not seem to accept self.index. I get the error:

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

To me, this error indicates that it is not looking for index as a custom property of the label but of the template root.

---

<div class="post-metadata">

**Author:** ![ryan.white](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/ryan.white/32/73193_2.png) [@ryan.white](https://forum.inductiveautomation.com/u/ryan.white)\
**Post date:** [April 15, 2025, 4:30pm UTC](https://forum.inductiveautomation.com/t/trouble-w-custom-properties-in-template-binding-expressions/105116/8 "2025-04-15T16:30:35Z")

</div>

I'm guessing `EpsonRobot` is the name of the template? In that case, `self.index` should be `EpsonRobot.index`, assuming the `index` property is defined on the template base. Capitlization is important, make sure it matches what you have defined.

---

<div class="post-metadata">

**Author:** ![gschettler](https://avatars.discourse-cdn.com/v4/letter/g/bbe5ce/32.png) [@gschettler](https://forum.inductiveautomation.com/u/gschettler)\
**Post date:** [April 15, 2025, 4:31pm UTC](https://forum.inductiveautomation.com/t/trouble-w-custom-properties-in-template-binding-expressions/105116/9 "2025-04-15T16:31:54Z")

</div>

I created index as a custom property of the label. The goal being I can copy and paste this and the change the index. Does 'self" reference the individual object (label, button, etc.) or the template?

---

<div class="post-metadata">

**Author:** ![ryan.white](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/ryan.white/32/73193_2.png) [@ryan.white](https://forum.inductiveautomation.com/u/ryan.white)\
**Post date:** [April 15, 2025, 4:32pm UTC](https://forum.inductiveautomation.com/t/trouble-w-custom-properties-in-template-binding-expressions/105116/10 "2025-04-15T16:32:40Z")

</div>

> [@gschettler](#):
>
> individual object

This

> [@gschettler](#):
>
> custom property of the label.

If this is the case, then you will need to move the indirect binding onto a custom property of the label instead.

---

<div class="post-metadata">

**Author:** ![gschettler](https://avatars.discourse-cdn.com/v4/letter/g/bbe5ce/32.png) [@gschettler](https://forum.inductiveautomation.com/u/gschettler)\
**Post date:** [April 15, 2025, 4:33pm UTC](https://forum.inductiveautomation.com/t/trouble-w-custom-properties-in-template-binding-expressions/105116/11 "2025-04-15T16:33:32Z")

</div>

Okay that's what I would have thought. So I guess I don't know why it is not finding index when i type self.index as a reference.

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/5/5/55b107ff8ac659afa4eba976159324c4e5b45697.png)  
In this screenshot you can see my two custom properties for the label. The indirect binding to the right is for tagValue.

---

<div class="post-metadata">

**Author:** ![ryan.white](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/ryan.white/32/73193_2.png) [@ryan.white](https://forum.inductiveautomation.com/u/ryan.white)\
**Post date:** [April 15, 2025, 4:38pm UTC](https://forum.inductiveautomation.com/t/trouble-w-custom-properties-in-template-binding-expressions/105116/12 "2025-04-15T16:38:49Z")

</div>

Did you add the custom property while the binding popup was open? That may cause issues.

Also, with the second item of the indirect binding selected, you can click the list icon to the right to manually navigate the item structure and select a property. See if it shows up there.

 ![propertyBrowser](https://us1.discourse-cdn.com/inductiveautomation/original/3X/f/a/fa92206315bc98f3781b974d2ca7ac99bfd4c998.png)

---

<div class="post-metadata">

**Author:** ![vtran](https://avatars.discourse-cdn.com/v4/letter/v/779978/32.png) [@vtran](https://forum.inductiveautomation.com/u/vtran)\
**Post date:** [April 15, 2025, 4:43pm UTC](https://forum.inductiveautomation.com/t/trouble-w-custom-properties-in-template-binding-expressions/105116/13 "2025-04-15T16:43:12Z")

</div>

ok, yeah, `this` only works in perspective. in Vision, you'll have to pick the label by name. But once you get it set up correctly, Ignition will automatically update the reference when you copy it.

---

<div class="post-metadata">

**Author:** ![vtran](https://avatars.discourse-cdn.com/v4/letter/v/779978/32.png) [@vtran](https://forum.inductiveautomation.com/u/vtran)\
**Post date:** [April 15, 2025, 5:03pm UTC](https://forum.inductiveautomation.com/t/trouble-w-custom-properties-in-template-binding-expressions/105116/14 "2025-04-15T17:03:31Z")

</div>

in your 2nd reference, You can try `EpsonRobot.Label.index` instead of `self.index`. `self` is a reference to the whole template and not the label component that you're selecting.

---

<div class="post-metadata">

**Author:** ![gschettler](https://avatars.discourse-cdn.com/v4/letter/g/bbe5ce/32.png) [@gschettler](https://forum.inductiveautomation.com/u/gschettler)\
**Post date:** [April 15, 2025, 5:29pm UTC](https://forum.inductiveautomation.com/t/trouble-w-custom-properties-in-template-binding-expressions/105116/15 "2025-04-15T17:29:16Z")

</div>

Okay I think i got it all working now.

@vtran, you are correct. It looks like self is looking at the whole template. You are also correct that ignition will automatically update the references that are pointing to itself in the tree. That was the key I was missing.

After correcting the instances of "self" in all of my bindings and expressions everything is working right! And I can copy and paste it and only update the index and everything links up correctly.

Thanks so much for your help @vtran and @ryan.white!
