# Passing Tagpath in Tag expression

**URL:** <https://forum.inductiveautomation.com/t/passing-tagpath-in-tag-expression/114011>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [February 17, 2026, 6:31pm UTC](https://forum.inductiveautomation.com/t/passing-tagpath-in-tag-expression/114011 "2026-02-17T18:31:18Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jbrownen](https://avatars.discourse-cdn.com/v4/letter/j/2bfe46/32.png) [@Jbrownen](https://forum.inductiveautomation.com/u/Jbrownen)\
**Post date:** [February 17, 2026, 6:31pm UTC](https://forum.inductiveautomation.com/t/passing-tagpath-in-tag-expression/114011/1 "2026-02-17T18:31:19Z")

</div>

Hello again!

I am trying to make my values turn red if any of my alarm tags are = 1, I know how to do the transform part to actually make it change colors, I just can’t get the If statement to show a value. I am not sure if I have a syntax issue or the way I referenced my tagpath is incorrect?

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

---

<div class="post-metadata">

**Author:** ![dkhayes117](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/dkhayes117/32/68344_2.png) [@dkhayes117](https://forum.inductiveautomation.com/u/dkhayes117)\
**Post date:** [February 17, 2026, 6:36pm UTC](https://forum.inductiveautomation.com/t/passing-tagpath-in-tag-expression/114011/2 "2026-02-17T18:36:49Z")

</div>

Move your expression from a Tag expression, to just an expression. Also, you don't need the `if` statement, just `OR`ing them together should be enough.

Your current expression has an extra `1` in there.

---

<div class="post-metadata">

**Author:** ![Jbrownen](https://avatars.discourse-cdn.com/v4/letter/j/2bfe46/32.png) [@Jbrownen](https://forum.inductiveautomation.com/u/Jbrownen)\
**Post date:** [February 17, 2026, 6:45pm UTC](https://forum.inductiveautomation.com/t/passing-tagpath-in-tag-expression/114011/3 "2026-02-17T18:45:18Z")

</div>

![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/4/5/45407e352da5e4473749d8dd67039801e98c9489.png)

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/8/3/83b3b9958e7f6277d8dfb6008e2ceada1c3d6e6f.png)getting this error

---

<div class="post-metadata">

**Author:** ![dkhayes117](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/dkhayes117/32/68344_2.png) [@dkhayes117](https://forum.inductiveautomation.com/u/dkhayes117)\
**Post date:** [February 17, 2026, 6:46pm UTC](https://forum.inductiveautomation.com/t/passing-tagpath-in-tag-expression/114011/4 "2026-02-17T18:46:50Z")

</div>

You are missing a comma by the first `1` now.

It's generally easier to get good advice when you paste in expression and scripts instead of screenshots.

---

<div class="post-metadata">

**Author:** ![tgarrison](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/tgarrison/32/80965_2.png) [@tgarrison](https://forum.inductiveautomation.com/u/tgarrison)\
**Post date:** [February 17, 2026, 6:51pm UTC](https://forum.inductiveautomation.com/t/passing-tagpath-in-tag-expression/114011/5 "2026-02-17T18:51:00Z")

</div>

You need to either add the IF back to the start (since you have the then/else values at the end) or remove all the IF related stuff, and just have the 2 OR'd values, which will return a boolean without being in an IF.

---

<div class="post-metadata">

**Author:** ![Jbrownen](https://avatars.discourse-cdn.com/v4/letter/j/2bfe46/32.png) [@Jbrownen](https://forum.inductiveautomation.com/u/Jbrownen)\
**Post date:** [February 17, 2026, 6:58pm UTC](https://forum.inductiveautomation.com/t/passing-tagpath-in-tag-expression/114011/6 "2026-02-17T18:58:37Z")

</div>

Added the If back to front and that fixed it. Thanks for the help guys!  
`if({view.params.TagPath.Alarms.Alm_H}|| {view.params.TagPath.Alarms.Alm_HH} || {view.params.TagPath.Alarms.Alm_L} || {view.params.TagPath.Alarms.Alm_LL},1,0)`

---

<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:** [February 17, 2026, 7:01pm UTC](https://forum.inductiveautomation.com/t/passing-tagpath-in-tag-expression/114011/7 "2026-02-17T19:01:43Z")

</div>

The alternative without the IF would have been this:

```python
{view.params.TagPath.Alarms.Alm_H} || {view.params.TagPath.Alarms.Alm_HH} || {view.params.TagPath.Alarms.Alm_L} || {view.params.TagPath.Alarms.Alm_LL}

```

---

<div class="post-metadata">

**Author:** ![Jbrownen](https://avatars.discourse-cdn.com/v4/letter/j/2bfe46/32.png) [@Jbrownen](https://forum.inductiveautomation.com/u/Jbrownen)\
**Post date:** [February 17, 2026, 7:29pm UTC](https://forum.inductiveautomation.com/t/passing-tagpath-in-tag-expression/114011/8 "2026-02-17T19:29:51Z")

</div>

This also worked for me too. Thank you.

---

<div class="post-metadata">

**Author:** ![Nol](https://avatars.discourse-cdn.com/v4/letter/n/8e8cbc/32.png) [@Nol](https://forum.inductiveautomation.com/u/Nol)\
**Post date:** [February 17, 2026, 7:30pm UTC](https://forum.inductiveautomation.com/t/passing-tagpath-in-tag-expression/114011/9 "2026-02-17T19:30:10Z")

</div>

Just a question to clarify. Your expression looks like you're taking the current value of each alarm passed through as a parameter rather than the tagpath string for the alarms. Depending on how your views are configured sometimes parameters won't properly pass value changes after the view is already opened. So be mindful of that.

If your tags are all together in one UDT then you may want to consider switching to just using an indirect tag binding pointed to the tag's AlarmMetrics, likely the .HasActive

---

<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:** [February 19, 2026, 3:41am UTC](https://forum.inductiveautomation.com/t/passing-tagpath-in-tag-expression/114011/10 "2026-02-19T03:41:47Z")

</div>

Also note, that unfortunately more complex structures like your 3 tiers (tagpath, alarms, name) are also more likely to not receive their configured values the deeper the View is nested. This is most certainly a bug to do with race conditions, but definitely something to be aware of until it's fixed. The symptoms are random instances of views not showing the data for the values you're passing into their params (they will show the data for the view's default saved param values). It will be at random each page load which views are affected, and is more likely to occur with the more embedded views you have on the page

---

<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:** [February 19, 2026, 3:50am UTC](https://forum.inductiveautomation.com/t/passing-tagpath-in-tag-expression/114011/11 "2026-02-19T03:50:31Z")

</div>

> [@nminchin](#):
>
> most certainly a bug to do with race conditions

(this is why IA should initialize embedded views on the gateway-side, instead of letting the client drive everything, IMO)
