# Use of tag() binding in expressions is bad?

**URL:** <https://forum.inductiveautomation.com/t/use-of-tag-binding-in-expressions-is-bad/114558>\
**Category:** Ignition\
**Created:** [March 18, 2026, 7:22pm UTC](https://forum.inductiveautomation.com/t/use-of-tag-binding-in-expressions-is-bad/114558 "2026-03-18T19:22:10Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bigtalljv](https://avatars.discourse-cdn.com/v4/letter/b/e19adc/32.png) [@Bigtalljv](https://forum.inductiveautomation.com/u/Bigtalljv)\
**Post date:** [March 18, 2026, 7:22pm UTC](https://forum.inductiveautomation.com/t/use-of-tag-binding-in-expressions-is-bad/114558/1 "2026-03-18T19:22:10Z")

</div>

hi,

I wanted to get a little clarification on the use of the Tag() binding. I understand it’s bad for performance. What is the appropriate way to structure expressions? For example, say I have:

Analog Indicator view  
- Vertical indicator  
- Label

The “Analog Indicator” has a Param, DataTag for the root tag.

The Vertical Indicator has an indirect binding to the “DataTag/Value”. it also has an expression checking for limits that uses something like “Tag(DataTag +”/HiLimit”), Tag(DataTag +”/LoLimit”) for several tags., sometimes an extensive list if somebody weas trying to get fancy.

What would be the proper way to accomplish this? Do I create Custom Properties in the “Analog Indicator” view? Can I use the tag() bindings in the custom property? Then reference the result in the Vertical Indicator? Use a reference to the custom property, “view.custom.value” for example.

Most of our template make extensive use of the tag() binding. all of them have at least a couple and some have a dozen or more. This is due to inexperience in house and by an inexperienced integrator.

Now I get to fix it….

---

<div class="post-metadata">

**Author:** ![Steve\_Laubach](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/steve_laubach/32/60900_2.png) [@Steve\_Laubach](https://forum.inductiveautomation.com/u/Steve_Laubach)\
**Post date:** [March 18, 2026, 7:29pm UTC](https://forum.inductiveautomation.com/t/use-of-tag-binding-in-expressions-is-bad/114558/2 "2026-03-18T19:29:35Z")

</div>

Add a custom property for each value you are looking at. Populate those properties with tag or indirect tag bindings (fast). Reference those properties in your expression.

If you’re looking at the same values on multiple expressions across your screen you can benefit from having the properties live at the form or view level so they only get looked up once and propagate changes down through the screen.

---

<div class="post-metadata">

**Author:** ![lrose](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/lrose/32/62724_2.png) [@lrose](https://forum.inductiveautomation.com/u/lrose)\
**Post date:** [March 19, 2026, 2:03am UTC](https://forum.inductiveautomation.com/t/use-of-tag-binding-in-expressions-is-bad/114558/3 "2026-03-19T02:03:16Z")

</div>

Also, the tag() expression is acceptable to use in a tag (e.g an expression tag).

---

<div class="post-metadata">

**Author:** ![amarks](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/amarks/32/45610_2.png) [@amarks](https://forum.inductiveautomation.com/u/amarks)\
**Post date:** [March 20, 2026, 9:28pm UTC](https://forum.inductiveautomation.com/t/use-of-tag-binding-in-expressions-is-bad/114558/4 "2026-03-20T21:28:07Z")

</div>

Whenever you want to use the `tag()` expression function you're probably trying to do (at least) 2 things at once. Just break it into multiple simple, faster steps. The first of which is typically building a string path to the UDT instance where the tag(s) is located so that it can be used in (multiple) indirect bindings.

---

<div class="post-metadata">

**Author:** ![Bigtalljv](https://avatars.discourse-cdn.com/v4/letter/b/e19adc/32.png) [@Bigtalljv](https://forum.inductiveautomation.com/u/Bigtalljv)\
**Post date:** [March 24, 2026, 7:47pm UTC](https://forum.inductiveautomation.com/t/use-of-tag-binding-in-expressions-is-bad/114558/5 "2026-03-24T19:47:08Z")

</div>

Thanks. Here is a nice example of an expression binding we have. Should I change this up? There are a lot of tag() expressions. It’s to get the background status color for some equipment…

`if(tag({view.params.Tag}+"/Mtr/Sts_Available") = false || tag({view.params.Tag}+"/Mtr/Sts_Oper") && tag({view.params.Tag}+"/Mtr/Sts_Running"), "#000000",`  
`if(tag({view.params.Tag}+"/Mtr/Sts_FailtoStart") ||	tag({view.params.Tag}+"/Mtr/Sts_IOFault") || tag({view.params.Tag} + "_Turbo/Error_Status"), "#FF0000",`  
`if(tag({view.params.Tag}+"/Mtr/Sts_FailtoStop") && !tag({view.params.Turbo_Tag}+"/Load_to_On_Timer/DN"), "#FF0000",`  
`if(tag({view.params.Tag}+"/Mtr/Sts_Running") && tag({view.params.Turbo_Tag}+"/Load_Status"), "#72a7fe",`  
`if(tag({view.params.Turbo_Tag}+"/Running_Status") && tag({view.params.Turbo_Tag}+"/Unload_Status"), "#FFFFBF",`  
`if(tag({view.params.Tag}+"/Mtr/Sts_Running"),"#72a7fe","#c0c0c0"`  
`))))))`

---

<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:** [March 24, 2026, 7:51pm UTC](https://forum.inductiveautomation.com/t/use-of-tag-binding-in-expressions-is-bad/114558/6 "2026-03-24T19:51:28Z")

</div>

> [@Bigtalljv](#):
>
> Should I change this up?

Yes, definitely. Each one of your `tag(...)` usages should be changed to an indirect tag binding on a private custom property on the view. Reference the custom properties in your color picking expression.

> **[Indirect Tag Binding Mode​ - 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...

---

<div class="post-metadata">

**Author:** ![Bigtalljv](https://avatars.discourse-cdn.com/v4/letter/b/e19adc/32.png) [@Bigtalljv](https://forum.inductiveautomation.com/u/Bigtalljv)\
**Post date:** [March 24, 2026, 8:17pm UTC](https://forum.inductiveautomation.com/t/use-of-tag-binding-in-expressions-is-bad/114558/7 "2026-03-24T20:17:15Z")

</div>

Thanks, that’s what I thought….

---

<div class="post-metadata">

**Author:** ![Bigtalljv](https://avatars.discourse-cdn.com/v4/letter/b/e19adc/32.png) [@Bigtalljv](https://forum.inductiveautomation.com/u/Bigtalljv)\
**Post date:** [March 24, 2026, 8:26pm UTC](https://forum.inductiveautomation.com/t/use-of-tag-binding-in-expressions-is-bad/114558/8 "2026-03-24T20:26:00Z")

</div>

how about scripts vs expressions? Another employee had written this to do the same thing on other equipment.

```python
def determineValveColor(tagPath):
#All valve conditions to check
allTagPaths=[
tagPath + "/Valve/Alm_ActuatorFault",
tagPath + "/Valve/Alm_IOFault",
tagPath + "/Valve/Alm_TransitStall",
tagPath + "/Valve/Alm_FullStall",
tagPath + "/Valve/Alm_IntlkTrip",
tagPath + "/Valve/Sts_Opened",
tagPath + "/Valve/Sts_Closed",
tagPath + "/Valve/Sts_Opening",
tagPath + "/Valve/Sts_Closing",
tagPath + "/Valve/Sts_Available",
tagPath + "/Valve/Sts_Active",
tagPath + "/Valve/Sts_Prog"]

results = system.tag.readBlocking(allTagPaths)

ActFault = results[0].value
IoFault = results[1].value
TransitStall = results[2].value
FullStall = results[3].value
InlkTrip = results[4].value
StsOpen = results[5].value
StsClosed = results[6].value
StsOpening = results[7].value
StsClosing = results[8].value
Available = results[9].value
Active = results[10].value
Program = results[11].value

#Return color to indicate valve state
#if ActFault != null & ActFault:
if ActFault or IoFault or TransitStall or FullStall or InlkTrip:
    return "#FF0000"
if StsOpening or StsClosing:
    return "#FFFFBF"
if Active or StsOpen:
    return "#72a7fe"
if StsClosed or not Active or (not Available and Program):
    return "#c0c0c0"
else:
    return '#000000'`

```

---

<div class="post-metadata">

**Author:** ![Steve\_Laubach](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/steve_laubach/32/60900_2.png) [@Steve\_Laubach](https://forum.inductiveautomation.com/u/Steve_Laubach)\
**Post date:** [March 24, 2026, 8:34pm UTC](https://forum.inductiveautomation.com/t/use-of-tag-binding-in-expressions-is-bad/114558/9 "2026-03-24T20:34:15Z")

</div>

Scripts are also way slower than indirect bindings on properties.

When possible you want to do direct and indirect bindings to get values and then reference those values wherever you need them.

---

<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:** [March 24, 2026, 9:47pm UTC](https://forum.inductiveautomation.com/t/use-of-tag-binding-in-expressions-is-bad/114558/10 "2026-03-24T21:47:55Z")

</div>

If you want more control over the update workload, or need to handle a variable list of tag paths, you might find my Integration Toolkit's [tags()](https://www.automation-pros.com/toolkit/doc/utility.html#tags) expression function helpful. (Note the **plural**.)

---

<div class="post-metadata">

**Author:** ![Bigtalljv](https://avatars.discourse-cdn.com/v4/letter/b/e19adc/32.png) [@Bigtalljv](https://forum.inductiveautomation.com/u/Bigtalljv)\
**Post date:** [March 24, 2026, 10:04pm UTC](https://forum.inductiveautomation.com/t/use-of-tag-binding-in-expressions-is-bad/114558/11 "2026-03-24T22:04:19Z")

</div>

thanks all. Nothing like learning years too late on a system in production. I have lots fix/change. We were/are having bad performance issues. I think some of this might be part of the problem if I’m reading it right. I just wanted to double check before I got and start changing things.

---

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [March 24, 2026, 10:52pm UTC](https://forum.inductiveautomation.com/t/use-of-tag-binding-in-expressions-is-bad/114558/12 "2026-03-24T22:52:43Z")

</div>

> [@Bigtalljv](#):
>
> `if(tag({view.params.Tag}+"/Mtr/Sts_Available") = false || tag({view.params.Tag}+"/Mtr/Sts_Oper") && tag({view.params.Tag}+"/Mtr/Sts_Running"), "#000000",`  
> `if(tag({view.params.Tag}+"/Mtr/Sts_FailtoStart") ||	tag({view.params.Tag}+"/Mtr/Sts_IOFault") || tag({view.params.Tag} + "_Turbo/Error_Status"), "#FF0000",`  
> `if(tag({view.params.Tag}+"/Mtr/Sts_FailtoStop") && !tag({view.params.Turbo_Tag}+"/Load_to_On_Timer/DN"), "#FF0000",`  
> `if(tag({view.params.Tag}+"/Mtr/Sts_Running") && tag({view.params.Turbo_Tag}+"/Load_Status"), "#72a7fe",`  
> `if(tag({view.params.Turbo_Tag}+"/Running_Status") && tag({view.params.Turbo_Tag}+"/Unload_Status"), "#FFFFBF",`  
> `if(tag({view.params.Tag}+"/Mtr/Sts_Running"),"#72a7fe","#c0c0c0"`  
> `))))))`

As well as being terrible performance-wise, such a complicated expression is also a _nightmare_ to test and diagnose if you need to. Having these tags bound to their own custom props lets you easily see their values, and write test values into them to check your logic.

On a side note, the use of “magic” colours here is also poor practice. These should be moved into style classes so that you have globally defined _named_ colours rather than colours copied and pasted throughout the project. Magic colours and values are a maintenance nightmare and are prone to mistakes, inconsistencies, deviations from standards, as well as being incompatible with theming. Ideally you would define your colours inside variables within a custom CSS theme, reference these colour variables within style classes, and then use the style classes within your UI so that your colours are:

- defined in a single place
- can be themed
- can be selected from a dropdown (i.e. the style.classes list)

Sounds like a nightmare of a project to be fixing up 🫪

---

<div class="post-metadata">

**Author:** ![michael.flagler](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/michael.flagler/32/26272_2.png) [@michael.flagler](https://forum.inductiveautomation.com/u/michael.flagler)\
**Post date:** [March 24, 2026, 11:15pm UTC](https://forum.inductiveautomation.com/t/use-of-tag-binding-in-expressions-is-bad/114558/13 "2026-03-24T23:15:05Z")

</div>

I had to fix a customer's system that was programmed like this also with tons of expressions using the `tag()` function. They couldn't even pull up a remote session of the vision client it was so bad. It took time, but once I went through and replaced all of them with bindings, not only were they able to pull up a remote session finally, but everything ran so much faster. (I wonder if it was the same integrator that did yours or if it's just common practice for "newbies" to Ignition to try to tag things like this in an attempt to replicate how FactoryTalk does it)

---

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [March 25, 2026, 12:08am UTC](https://forum.inductiveautomation.com/t/use-of-tag-binding-in-expressions-is-bad/114558/14 "2026-03-25T00:08:39Z")

</div>

> [@michael.flagler](#):
>
> if it's just common practice for "newbies" to Ignition to try to

I think it’s just this. When I started Ignition I used this everywhere too. I still have an old project I work on where I see it used extensively 🙄 I think the issue is that there are so many ways to do things, and there’s not really much in the way of a guide for n00bs (or even intermediate and advanced) to use that warns of poor practices and what to do instead. This forum provides most of this info, but it requires a lot of time and diligence to read topics and posts to sift it out which most people wouldn’t do. I wonder if AI could consolidate the advice across the forum?

---

<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:** [March 25, 2026, 12:17am UTC](https://forum.inductiveautomation.com/t/use-of-tag-binding-in-expressions-is-bad/114558/15 "2026-03-25T00:17:43Z")

</div>

Maybe someone needs to write ~~an Ignition For Dummies~~ _a Beginner's Guide To Ignition_ ...

---

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [March 25, 2026, 12:21am UTC](https://forum.inductiveautomation.com/t/use-of-tag-binding-in-expressions-is-bad/114558/16 "2026-03-25T00:21:22Z")

</div>

If only there was an Ignition guru on the forum 🤭 I’m sure if there was that he or she would have plenty of spare time!

---

<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:** [March 25, 2026, 12:23am UTC](https://forum.inductiveautomation.com/t/use-of-tag-binding-in-expressions-is-bad/114558/17 "2026-03-25T00:23:36Z")

</div>

> [@nminchin](#):
>
> plenty of spare time!

Bwah, hah, hah!

---

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [March 25, 2026, 12:28am UTC](https://forum.inductiveautomation.com/t/use-of-tag-binding-in-expressions-is-bad/114558/18 "2026-03-25T00:28:02Z")

</div>

Here’s what Claude prepared for me. I haven’t looked through it yet… (had to zip as forum doesn’t like docx extensions)

[Ignition\_Best\_Practices\_Guide.zip](https://forum.inductiveautomation.com/uploads/short-url/1NM9KKnVQAADTm3xFesI0YoW4xi.zip) (26.6 KB)

---

<div class="post-metadata">

**Author:** ![bmusson](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bmusson/32/87530_2.png) [@bmusson](https://forum.inductiveautomation.com/u/bmusson)\
**Post date:** [March 25, 2026, 12:31am UTC](https://forum.inductiveautomation.com/t/use-of-tag-binding-in-expressions-is-bad/114558/19 "2026-03-25T00:31:54Z")

</div>

![ani5g4](https://us1.discourse-cdn.com/inductiveautomation/original/3X/6/a/6ada14d7988678d4082d72392859bfeaee3afd68.jpeg)

---

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [March 25, 2026, 12:53am UTC](https://forum.inductiveautomation.com/t/use-of-tag-binding-in-expressions-is-bad/114558/20 "2026-03-25T00:53:55Z")

</div>

“Do you want me to help you to replace all of your tag bindings with `tag()` expressions?”

I’m reading through the doc claude produced, and it did a pretty good job tbh. Styling could do with some work… but content is mostly good

[Next page](https://forum.inductiveautomation.com/t/use-of-tag-binding-in-expressions-is-bad/114558.md?page=2)
