Nested Path

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?

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

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.

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,

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 :

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.

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

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

[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

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:

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!

Where are you passing the Indirect window name?

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

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:

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.

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?

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!

It is in the master template.

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

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