# Perspective Tag Indirection and View Property Changes

**URL:** <https://forum.inductiveautomation.com/t/perspective-tag-indirection-and-view-property-changes/53658>\
**Category:** Ignition\
**Tags:** ignition81, perspective\
**Created:** [December 2, 2021, 4:08am UTC](https://forum.inductiveautomation.com/t/perspective-tag-indirection-and-view-property-changes/53658 "2021-12-02T04:08:10Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![simon.wesley](https://avatars.discourse-cdn.com/v4/letter/s/8491ac/32.png) [@simon.wesley](https://forum.inductiveautomation.com/u/simon.wesley)\
**Post date:** [December 2, 2021, 4:08am UTC](https://forum.inductiveautomation.com/t/perspective-tag-indirection-and-view-property-changes/53658/1 "2021-12-02T04:08:10Z")

</div>

Hi All,

Ive looked at a few other posts, and i cant seem to find anything quite similar.

I am upgrading a Vision project into perspective and I am trying to figure out the most efficient way to build pages and views that can vary in their respective content. Specifically, differing tag paths once inside the tag folder and some items are also not available on some sites.

I am passing the the site “root” tag path from the browser and we are building out the remaining tag path with Indirect Tag binding, perhaps with a few other parameters.

What i am finding is that our sites are built fairly similar, but not all sites are using the sae Tagpath for the same on screen element, and therefore descriptions change, units, etc.

Is there a design principle i am missing where I can choose what tag goes on screens with ease and without processing at the GUI level with visibilities etc.?

Ive thought of making views that are of same type which i can swap out when navigating with some parameter . However then i am left with some of the content on the additional screens would need to be directed from Meter 1 to Meter 4 on certain sites only (as an example)

its late , and I hope I’m clear enough and I can show screenshots for clarity,

Trying to make a simple system rather than pass parameters until the day is long. I already notice sometimes a screen refresh is required to get the right data in. (might be a different issue)

S

---

<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:** [December 2, 2021, 4:35am UTC](https://forum.inductiveautomation.com/t/perspective-tag-indirection-and-view-property-changes/53658/2 "2021-12-02T04:35:07Z")

</div>

So you have multiple sites that are mostly the same but sometimes the same devices are called different things? Sounds like a good time to standardise your tag naming if that’s the issue.

Otherwise if that’s not feasible or the right course, then depending on how different the sites are, you could either use, as you say, separate View templates for each site type, or you can handle the minor changes within the View template itself. You can use the expression function  
`qualityOf({tag}) != 'Bad_Disabled' and qualityOf({tag}) != 'Bad_NotFound'`  
or  
`isGood({tag})`  
to check the quality of tags for their existence and show/hide things based on that.

In either case, I would be keeping track of what “site type” your sites are. You could do that in a number of ways, using the UDT type or a memory tag if you’re using standard tags and not a site UDT. I would then be reading the value of this and then setting the right View template / use in your binding logic.

---

<div class="post-metadata">

**Author:** ![simon.wesley](https://avatars.discourse-cdn.com/v4/letter/s/8491ac/32.png) [@simon.wesley](https://forum.inductiveautomation.com/u/simon.wesley)\
**Post date:** [December 2, 2021, 5:00am UTC](https://forum.inductiveautomation.com/t/perspective-tag-indirection-and-view-property-changes/53658/3 "2021-12-02T05:00:12Z")

</div>

Thanks for your quick response. and yes i agree that naming would rename would be ideal.

Part of the problem is that the names would have been better purposed as real world names such as:

Group Gas Meter , Test Gas Meter, Group Oil meter, the issue s that the naming follows the configuration of the device (ie Meter 1, Meter 4, Meter 3, etc). SO thats a problem.

Secondly the tag-names are named identical, but the purpose can change:

ie  
Alarms  
------\>Compressor  
----------\>ALM1  
----------\>ALM2  
---------\>TAG1 (memory tag stating what the corresponding # alarm is.  
---------\>TAG2

Same thing with analogs - generic names.

Its a bad way to maintain a separate Xref list of what is what then search on a table.

I’ve though of using metadata in the tag to define what the tag is,

We used site UDTs originally but the change in the driver and not all at once the previous person broke the UDT instance to allow updating the tagnames one at a time, without the a loss in history etc.however the structure remains unchanged.

Would you think changing names and moving tags around will not destroy history? I’ve found exporting tags and modifying then importing does. might be a setting or my process… so I am leery… I suppose i could test.

Realistically i want to change the tag name to a meaningful, repeatable name that represents the process area and device, rather than a a generic folder OR a folder name for meters, that would solve most of my issues.

WHile on topic, do you pass a value down to a label or the tagpath. i read one updates once on page load and one on refresh of point… which could cause too much GUI load?

Thanks again!

---

<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:** [December 2, 2021, 6:37am UTC](https://forum.inductiveautomation.com/t/perspective-tag-indirection-and-view-property-changes/53658/4 "2021-12-02T06:37:39Z")

</div>

> [@simon.wesley](#):
>
> Would you think changing names and moving tags around will not destroy history? I’ve found exporting tags and modifying then importing does. might be a setting or my process… so I am leery… I suppose i could test.

The link between tags and history is purely their tag path. So if you change the tag path of a tag with history, the history will not follow with the new tag name / path. However you can always retrospectively reassign the history to the new tag path in the SQL database. Obviously you will then need to keep track of the tagpath changes which you should be able to use the audit log for. Setting it all up nicely would take a bit of time but i've certainly considered it myself as it would be a super useful tool!

> [@simon.wesley](#):
>
> Realistically i want to change the tag name to a meaningful, repeatable name that represents the process area and device, rather than a a generic folder OR a folder name for meters, that would solve most of my issues.

This would be my preference and is what I normally do. Either use a description of the device as in your examples (Group Gas Meter), or use equipment ids but ensure they're used consistently across all sites e.g. Meter 1 is _always_ Group Gas Meter, Meter 2 is _always_ Test Gas Meter, etc, regardless if the site has the device or not. For a site like you're describing, I would tend to use descriptive names instead.

> [@simon.wesley](#):
>
> WHile on topic, do you pass a value down to a label or the tagpath. i read one updates once on page load and one on refresh of point… which could cause too much GUI load?

When you say "to a label", what do you mean? I need a bit more context  
If you want the value to live update you need to bind to the tag path.

---

<div class="post-metadata">

**Author:** ![simon.wesley](https://avatars.discourse-cdn.com/v4/letter/s/8491ac/32.png) [@simon.wesley](https://forum.inductiveautomation.com/u/simon.wesley)\
**Post date:** [December 3, 2021, 2:01pm UTC](https://forum.inductiveautomation.com/t/perspective-tag-indirection-and-view-property-changes/53658/5 "2021-12-03T14:01:49Z")

</div>

Apologies, I confused the issue.  
What I meant to ask was if I pass the tag path down to the root of my embedded view then I can use the tag path as reference to the object to grab any property. What i read somewhere in the forum that the binding of a tag path is evaluated upon page load…yet the binding of a value is constantly evaluated.

I was looking for advice on best practice to pass the full tag path (so I dot have to hardcore the remainder), and was wondering if there are any performance concerns, as I think I read.

THanks a bunch!

---

<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:** [December 4, 2021, 10:11am UTC](https://forum.inductiveautomation.com/t/perspective-tag-indirection-and-view-property-changes/53658/6 "2021-12-04T10:11:58Z")

</div>

> [@simon.wesley](#):
>
> What i read somewhere in the forum that the binding of a tag path is evaluated upon page load…yet the binding of a value is constantly evaluated.

I'm not sure to which topic you're referring, but I _always_ pass tag paths to my embedded views and then use indirect bindings to read tags based on those tag paths passed in.

---

<div class="post-metadata">

**Author:** ![simon.wesley](https://avatars.discourse-cdn.com/v4/letter/s/8491ac/32.png) [@simon.wesley](https://forum.inductiveautomation.com/u/simon.wesley)\
**Post date:** [December 4, 2021, 1:09pm UTC](https://forum.inductiveautomation.com/t/perspective-tag-indirection-and-view-property-changes/53658/7 "2021-12-04T13:09:03Z")

</div>

Thanks Nick, I think I follow you.

The comment i was referring to is in this reply to this topic:

> [@Slow loading times after 8.0.14](https://forum.inductiveautomation.com/t/slow-loading-times-after-8-0-14/37413/5):
>
> Yes. Consider that tag values update repeatedly and asynchronously, while tag paths are typically evaluated only when a Perspective view/page opens. The reduction in work in an Expression Structure that only has to evaluate tag values (from custom props) as opposed to also evaluating tag paths (that are now only part of the custom props) is a win even though there are more bindings overall. Also consider that while an Expression Structure may be needed to deliver consistent data+config to a c…

After re-reading the comment with fresh eyes, I believe what @pturmel was referring to was typical updates to tag values, for tag value/quality updates to a property such as a label, not reevaluating the binding.

h
