I'm trying to create a template in Perspective (kind of like how they have templates in Vision) using embedded views. I'm trying to get it to where I can have my tag path change based on a parameter so that I don't have to go in and change every single expression whenever I add a new machine.
I want my paths to look something like this: tag("[default]" + {view.params.machine} + "/Inputs/Running")
I'm pretty sure the syntax of my path is correct based on what others have done on the forum. I think my error lies in how I'm setting up the parameter in my embedded view.
Is there anything else I should attach or any additional information? I’m still relatively a beginner at ignition so I might not be the best at explaining things.
I eventually want to get it to the point where I can replace all my tag paths for my expressions to do stuff like this:
After doing that, hover over the result of the binding to see what the error could be (where it is written Bad_NotFound).
EDIT: To achieve what you are trying to do with your last screenshot, consider creating as many custom properties as needed, each of those custom properties should be an indirect tag binding.
Don't use magic colors (hard coded color codes). Instead use style classes and/or css variables. That way when you need to change a color, you only have to do it in one place.
Show us a screenshot of what you did. Make sure you follow exactly what I did in my screenshot (it is not enough to write {machine} in the tagpath, you have to also specify where this data points to, in this case {view.params.machine})
Alright thats good advice, I had my backgroundColor property binded using this expression for my label to automatically change colors based on a status of my machine so I’ll look into that.