# Nested Path

**URL:** <https://forum.inductiveautomation.com/t/nested-path/11006>\
**Category:** Ignition\
**Created:** [January 7, 2016, 2:45pm UTC](https://forum.inductiveautomation.com/t/nested-path/11006 "2016-01-07T14:45:20Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mr.K001](https://avatars.discourse-cdn.com/v4/letter/m/ea5d25/32.png) [@Mr.K001](https://forum.inductiveautomation.com/u/Mr.K001)\
**Post date:** [January 7, 2016, 2:45pm UTC](https://forum.inductiveautomation.com/t/nested-path/11006/1 "2016-01-07T14:45:20Z")

</div>

The machines I get my data from all have multiple OP stations and I made a box data with multiple information about each OP so for multiple OPs I basically copy and paste my Box and change the OP name. So I was thinking to try something different and Instead of doing it the old way try to pass the Path folder and OP names to the window I have my boxes In and then each box use the Path parameter and a specific OP name parameter to populate all the required data, all sounded good till I actually tried it, I didn’t realize you can’t have nested paths like this ` {{Path}/{OP}/TagName} `  
Is there anyway around it?

---

<div class="post-metadata">

**Author:** ![Mr.K001](https://avatars.discourse-cdn.com/v4/letter/m/ea5d25/32.png) [@Mr.K001](https://forum.inductiveautomation.com/u/Mr.K001)\
**Post date:** [January 7, 2016, 2:56pm UTC](https://forum.inductiveautomation.com/t/nested-path/11006/2 "2016-01-07T14:56:40Z")

</div>

looking into Templates see if It can solve my problem. We shall see what happens 😮

Update:  
I think Templates will help but I still need to use multiple parameters together to make a complete path and I’m not allowed to use nested paths.

---

<div class="post-metadata">

**Author:** ![nmudge](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nmudge/32/3394_2.png) [@nmudge](https://forum.inductiveautomation.com/u/nmudge)\
**Post date:** [January 7, 2016, 4:00pm UTC](https://forum.inductiveautomation.com/t/nested-path/11006/3 "2016-01-07T16:00:55Z")

</div>

I have a feeling I might be able to help you but I don’t understand your description so I don’t know what you are trying to do.

Where are you trying to use a path? In an expression? Or are you trying to make a change to a UDT?

Can you perhaps use pictures, or explain more clearly? Can’t have nested paths where? What do you mean by a nested path?

Best,

---

<div class="post-metadata">

**Author:** ![Mr.K001](https://avatars.discourse-cdn.com/v4/letter/m/ea5d25/32.png) [@Mr.K001](https://forum.inductiveautomation.com/u/Mr.K001)\
**Post date:** [January 7, 2016, 4:52pm UTC](https://forum.inductiveautomation.com/t/nested-path/11006/4 "2016-01-07T16:52:38Z")

</div>

For each line I created a data type for that line so creating 10 different OPs would be as easy as few steps since I use to make them one by one.  
Yes I’m trying to use the tag in expression. the main pain was individually changing the path of a component for every op, so I was looking into ways of simplifying things.  
I think I fixed the issue, I went with the template option, created the box i use and set the parameters up how I wanted them, I just included a memory tag in each op folder that has the path to that op and then in my expression box I used :

```auto
tag({Path} + "/OP_Status/Faulted")
```

Now I just grab my box and bind 6 custom properties with tags and all good to go. definitely much faster than before.

---

<div class="post-metadata">

**Author:** ![MMaynard](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mmaynard/32/3366_2.png) [@MMaynard](https://forum.inductiveautomation.com/u/MMaynard)\
**Post date:** [January 7, 2016, 5:23pm UTC](https://forum.inductiveautomation.com/t/nested-path/11006/5 "2016-01-07T17:23:09Z")

</div>

if you are using expressions you can build the tag path and use it with the Tag() function

Example from the Docs at [docs.inductiveautomation.com/display/DOC/tag](https://docs.inductiveautomation.com/display/DOC/tag)

```auto
tag("Tanks/Tank" + {Root Container.TankNum}) //returns the value for the tank represented by the dynamic property TankNum on the Root Container.
```

---

<div class="post-metadata">

**Author:** ![Mr.K001](https://avatars.discourse-cdn.com/v4/letter/m/ea5d25/32.png) [@Mr.K001](https://forum.inductiveautomation.com/u/Mr.K001)\
**Post date:** [January 7, 2016, 6:20pm UTC](https://forum.inductiveautomation.com/t/nested-path/11006/6 "2016-01-07T18:20:23Z")

</div>

[quote=“MMaynardUSG”]if you are using expressions you can build the tag path and use it with the Tag() function

Example from the Docs at [docs.inductiveautomation.com/display/DOC/tag](https://docs.inductiveautomation.com/display/DOC/tag)

```auto
tag("Tanks/Tank" + {Root Container.TankNum}) //returns the value for the tank represented by the dynamic property TankNum on the Root Container.
```

I did come across that and it definitely solved my problems but now I’m facing a weird issue, I’m trying to jump from my boxes to a different window and pass a variable. I use:

```auto
window = system.nav.openWindow('Main Windows/Assembly/Apron_RH/Apron_RH_CycleTime', {'OPName' : 'OP5'})
system.nav.centerWindow(window)
```

But for some weird reason it doesn’t work. I use this method all the time so I can make anything act as a button and I never had any problems with it until now, originally I tried include my parameter(bind it to a property) and leave the window path empty so I can just manually change them on each box but The change would never show on my template instances (boxes) so I ended up change them individually and then tried to click on the box to see if it works and goes to the next window but it wouldn’t. double checked the window I’m trying to go to, its exist, works fine and the path is correct.  
any idea?

P.S. I made a few changes to the template and now I only have to bind two tags to the template properties for it to load everything else, saves so much time!

---

<div class="post-metadata">

**Author:** ![MMaynard](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mmaynard/32/3366_2.png) [@MMaynard](https://forum.inductiveautomation.com/u/MMaynard)\
**Post date:** [January 7, 2016, 10:08pm UTC](https://forum.inductiveautomation.com/t/nested-path/11006/7 "2016-01-07T22:08:00Z")

</div>

Where are you passing the Indirect window name?

I use the following in my templates to open windows and pass parameters

```auto
param1 = event.source.parent.UDT.Meta.TagName

window = system.nav.openWindow('Trending/QuickTrend', {'LOOPID' : param1})
system.nav.centerWindow(window)
```

What you are looking to do is something like this I believe:

```auto
param1 = event.source.parent.windowname
param2 = event.source.parent.priority

window = system.nav.openWindow(param1, {'HelpTopic' : param2})
system.nav.centerWindow(window)
```

Where the event.source.parent.windowname is a custom string property on the template window.

---

<div class="post-metadata">

**Author:** ![Mr.K001](https://avatars.discourse-cdn.com/v4/letter/m/ea5d25/32.png) [@Mr.K001](https://forum.inductiveautomation.com/u/Mr.K001)\
**Post date:** [January 8, 2016, 2:24pm UTC](https://forum.inductiveautomation.com/t/nested-path/11006/8 "2016-01-08T14:24:00Z")

</div>

> [@MMaynardUSG](#):
>
> Where are you passing the Indirect window name?

I guess I'm not passing the window name, the only thing I was passing was a string(OP name) so it could be used on the next window.

Your method is pretty much like mine, they only difference is your parameter being passed is a tag name and my parameter is just a string I type manually.  
What I wanted to figure out was why my template instance wasn't accepting the window navigation I was giving it since all you are saying is hey if a mouse is clicked on this location you go to the window.

One other question, do you have that script in your master template or do you include that in each individual template instances?

---

<div class="post-metadata">

**Author:** ![Mr.K001](https://avatars.discourse-cdn.com/v4/letter/m/ea5d25/32.png) [@Mr.K001](https://forum.inductiveautomation.com/u/Mr.K001)\
**Post date:** [January 8, 2016, 3:20pm UTC](https://forum.inductiveautomation.com/t/nested-path/11006/9 "2016-01-08T15:20:11Z")

</div>

Well, Problem solved, ended up adding a button behind the multi-state indicator of and added the script to that in the master template and bind both the window path and op name to a custom property and walla, all set, still puzzles me why I couldn’t get any other component to work as a button like I do everywhere else. anyways, Problem is solved so all is well! Thanks for all the help!

---

<div class="post-metadata">

**Author:** ![MMaynard](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mmaynard/32/3366_2.png) [@MMaynard](https://forum.inductiveautomation.com/u/MMaynard)\
**Post date:** [January 8, 2016, 3:21pm UTC](https://forum.inductiveautomation.com/t/nested-path/11006/10 "2016-01-08T15:21:35Z")

</div>

It is in the master template.

---

<div class="post-metadata">

**Author:** ![Mr.K001](https://avatars.discourse-cdn.com/v4/letter/m/ea5d25/32.png) [@Mr.K001](https://forum.inductiveautomation.com/u/Mr.K001)\
**Post date:** [January 8, 2016, 3:32pm UTC](https://forum.inductiveautomation.com/t/nested-path/11006/11 "2016-01-08T15:32:22Z")

</div>

This is ended up being what I used in my master connection and the other screenshot is the properties used, It works.

---

<div class="post-metadata">

**Author:** ![Mr.K001](https://avatars.discourse-cdn.com/v4/letter/m/ea5d25/32.png) [@Mr.K001](https://forum.inductiveautomation.com/u/Mr.K001)\
**Post date:** [January 8, 2016, 3:42pm UTC](https://forum.inductiveautomation.com/t/nested-path/11006/12 "2016-01-08T15:42:11Z")

</div>

Just out of curiosity, is it possible to make a transaction group template?
