# Nested Paths Not Allowed (Perspective)

**URL:** <https://forum.inductiveautomation.com/t/nested-paths-not-allowed-perspective/54987>\
**Category:** Ignition\
**Created:** [January 13, 2022, 5:10pm UTC](https://forum.inductiveautomation.com/t/nested-paths-not-allowed-perspective/54987 "2022-01-13T17:10:27Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mitchell\_Lagenour](https://avatars.discourse-cdn.com/v4/letter/m/b19c9b/32.png) [@Mitchell\_Lagenour](https://forum.inductiveautomation.com/u/Mitchell_Lagenour)\
**Post date:** [January 13, 2022, 5:10pm UTC](https://forum.inductiveautomation.com/t/nested-paths-not-allowed-perspective/54987/1 "2022-01-13T17:10:27Z")

</div>

Hello, I am new to Ignition and still learning.

I am creating a template with Indirect tag bindings. The goal is to have a user click on a pump and a popup will open of a template to auto populate the tags within the template.

I have been making progress using custom parameters and the indirect tag bindings. However, I have ran into an issue where I need a button to change colors based if it is pressed or not. This button needs to see if the pump is in “Hand” AND if the pump is on or off. So if the pump is in “HAND” and you press the “ON” button, the button will change colors to signify the pump is on.

I have very limited knowledge when it comes to expressions and scripting so I came up with the following expression for this:

(!{[default]_Sadorus Pump Station_/Controller:Global/SBS\_PUMP\_1/DS\_AUTO}) & ({[default]_Sadorus Pump Station_/Controller:Global/SBS\_PUMP\_1/DI\_ON})

If the pump is NOT in “Auto” AND the pump is “On”, this will bring back a value of 1 which I can transform into a color.

So to make this an indirect binding, I would change the “SBS\_PUMP\_1/DS\_AUTO” and the “SBS\_PUMP\_1/DI\_ON” with the parameter in the template. So it will look like:

(!{[default]_Sadorus Pump Station_/Controller:Global/{view.params.PumpStateTag}}) & ({[default]_Sadorus Pump Station_/Controller:Global/{view.params.PumpStatusTag})

However, upon doing so, I get the following error:  
“Nested paths not allowed”

Could I have some assistance on this?

---

<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:** [January 13, 2022, 5:17pm UTC](https://forum.inductiveautomation.com/t/nested-paths-not-allowed-perspective/54987/2 "2022-01-13T17:17:43Z")

</div>

First, the logical AND operator is &&

If you need to dynamically call tags from an expression then you need to use the `tag()` expression function.

[https://docs.inductiveautomation.com/display/DOC81/tag](https://docs.inductiveautomation.com/display/DOC81/tag)

```auto
(!tag('[default]Sadorus Pump Station/Controller:Global/'+ {view.params.PumpStateTag}) && (tag('[default]Sadorus Pump Station/Controller:Global/' + {view.params.PumpStateTag}))

```

---

<div class="post-metadata">

**Author:** ![Mitchell\_Lagenour](https://avatars.discourse-cdn.com/v4/letter/m/b19c9b/32.png) [@Mitchell\_Lagenour](https://forum.inductiveautomation.com/u/Mitchell_Lagenour)\
**Post date:** [January 13, 2022, 5:40pm UTC](https://forum.inductiveautomation.com/t/nested-paths-not-allowed-perspective/54987/3 "2022-01-13T17:40:57Z")

</div>

Thank you for the reply,

However, upon entering your code, I get a “Error\_TypeConversion” error. But it also brings back a value?

---

<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:** [January 13, 2022, 6:18pm UTC](https://forum.inductiveautomation.com/t/nested-paths-not-allowed-perspective/54987/4 "2022-01-13T18:18:35Z")

</div>

_ **Psst!** _ Don’t use `tag()`. There be dragons.

Use indirect binding to bring those booleans to custom properties in your template. (Internal or on the template’s components.) Then use those properties in your expressions.

---

<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:** [January 13, 2022, 6:19pm UTC](https://forum.inductiveautomation.com/t/nested-paths-not-allowed-perspective/54987/5 "2022-01-13T18:19:35Z")

</div>

Do said dragons apply to perspective as well seeing as how you’re already at the gateway?

---

<div class="post-metadata">

**Author:** ![Mitchell\_Lagenour](https://avatars.discourse-cdn.com/v4/letter/m/b19c9b/32.png) [@Mitchell\_Lagenour](https://forum.inductiveautomation.com/u/Mitchell_Lagenour)\
**Post date:** [January 13, 2022, 6:25pm UTC](https://forum.inductiveautomation.com/t/nested-paths-not-allowed-perspective/54987/6 "2022-01-13T18:25:28Z")

</div>

Well I got it working using the following code:

(!(tag("[default]_Sadorus Pump Station_/Controller:Global/" + {view.params.PumpStateTag}))) && (tag("[default]_Sadorus Pump Station_/Controller:Global/" + {view.params.PumpStatusTag}))

However, is using the “tag()” option a bad way to do it?

When you say “Use indirect binding to bring those booleans to custom properties in your template” could you elaborate?

Thank you for the help!

---

<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:** [January 13, 2022, 6:25pm UTC](https://forum.inductiveautomation.com/t/nested-paths-not-allowed-perspective/54987/7 "2022-01-13T18:25:36Z")

</div>

Historically, `tag()` just slowed Vision down. It tends to crush Perspective.

---

<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:** [January 13, 2022, 6:30pm UTC](https://forum.inductiveautomation.com/t/nested-paths-not-allowed-perspective/54987/8 "2022-01-13T18:30:18Z")

</div>

Create view custom properties for each boolean that would otherwise need the `tag()` function. Use indirect binding to combine your static and dynamic tag path parts for those booleans to bring their live data into the view. Then construct your expression with those properties in place of the `tag()` expressions. It also eliminates multiple identical `tag()` expressions when you use a particular boolean in more than one spot in the expression.

---

<div class="post-metadata">

**Author:** ![Isaiah\_Clemons](https://avatars.discourse-cdn.com/v4/letter/i/dc4da7/32.png) [@Isaiah\_Clemons](https://forum.inductiveautomation.com/u/Isaiah_Clemons)\
**Post date:** [February 25, 2025, 4:50pm UTC](https://forum.inductiveautomation.com/t/nested-paths-not-allowed-perspective/54987/9 "2025-02-25T16:50:31Z")

</div>

I am in the middle of converting a lot of simple scripting functions to expression bindings for performance reasons, does `tag()` have worse performance than `runScript()` when run in the expression bindings?

---

<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:** [February 25, 2025, 4:55pm UTC](https://forum.inductiveautomation.com/t/nested-paths-not-allowed-perspective/54987/10 "2025-02-25T16:55:52Z")

</div>

> [@Isaiah\_Clemons](#):
>
> simple scripting functions to expression bindings

If you are then calling `runScript()`, you aren't changing anything's performance. Jython has notable startup overhead.

The `tag()` expression function has other problems, and should _ **never** _ be used outside of actual expression **tags**. Really, don't use it in user interfaces. Use custom properties with indirect tag bindings, then use those properties where you would have used the `tag()` function.

---

<div class="post-metadata">

**Author:** ![Isaiah\_Clemons](https://avatars.discourse-cdn.com/v4/letter/i/dc4da7/32.png) [@Isaiah\_Clemons](https://forum.inductiveautomation.com/u/Isaiah_Clemons)\
**Post date:** [February 25, 2025, 6:49pm UTC](https://forum.inductiveautomation.com/t/nested-paths-not-allowed-perspective/54987/11 "2025-02-25T18:49:13Z")

</div>

I was calling `runScript()` but after some digging around on why my perspective session was being so slow, I came to the conclusion that it was partially because of all of the jython environments that had to get booted up for simple UI properties (was this an incorrect conclusion?) and so I am converting the `runscript()` to expression logic to determine certain properties such as button classes, button text, image paths, etc. In converting these to pure expression binding syntax i am using `tag()` but you are saying that their is no performance difference between `tag()` and `runScript()`? and that I should be creating custom properties with indirect tag bindings and then using those properties in the expression binding syntax?

Could you explain a little more about the difference of these two methods (`tag()` vs indirect tag bindings on custom properties) in terms of what goes on under the hood?

Thank you, your help is greatly appreciated.

---

<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:** [February 25, 2025, 7:04pm UTC](https://forum.inductiveautomation.com/t/nested-paths-not-allowed-perspective/54987/12 "2025-02-25T19:04:42Z")

</div>

> [@Isaiah\_Clemons](#):
>
> but you are saying that their is no performance difference between `tag()` and `runScript()`?

Both have performance problems. In some cases, `tag()` can be much worse.

> [@Isaiah\_Clemons](#):
>
> creating custom properties with indirect tag bindings and then using those properties in the expression binding syntax?

That's almost verbatim what I wrote above.

> [@Isaiah\_Clemons](#):
>
> explain a little more

It's complicated. I've written a great deal on this and related topics.

Start here:

> [@Automation Professionals' Integration Toolkit Module](https://forum.inductiveautomation.com/t/automation-professionals-integration-toolkit-module/74934/68):
>
> I don't know all the details of tag()'s problems, but I suspect there are two key contributors: tag() startup tries to supply a proper initial value, with a 1-second timeout, on startup everywhere it is used. Use a hundred tag() calls in the bindings on a Vision template or window and you can block your UI for up to a hundred seconds, looks like. Not sure how Perspective's parallelism fits here, but you'll either tie up a thread for a hundred seconds, or tie up a hundred threads from the Per…

Try [these next](https://forum.inductiveautomation.com/search?q=%40pturmel%20tag()%20indirect%20order%3Alatest).

---

<div class="post-metadata">

**Author:** ![Isaiah\_Clemons](https://avatars.discourse-cdn.com/v4/letter/i/dc4da7/32.png) [@Isaiah\_Clemons](https://forum.inductiveautomation.com/u/Isaiah_Clemons)\
**Post date:** [February 25, 2025, 7:30pm UTC](https://forum.inductiveautomation.com/t/nested-paths-not-allowed-perspective/54987/13 "2025-02-25T19:30:51Z")

</div>

Thanks, ill take a look
