# Expression to hide label in Template pointing to UDT

**URL:** <https://forum.inductiveautomation.com/t/expression-to-hide-label-in-template-pointing-to-udt/14489>\
**Category:** Ignition\
**Created:** [June 9, 2017, 9:15pm UTC](https://forum.inductiveautomation.com/t/expression-to-hide-label-in-template-pointing-to-udt/14489 "2017-06-09T21:15:06Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![joe.brodersen](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/joe.brodersen/32/3303_2.png) [@joe.brodersen](https://forum.inductiveautomation.com/u/joe.brodersen)\
**Post date:** [June 9, 2017, 9:15pm UTC](https://forum.inductiveautomation.com/t/expression-to-hide-label-in-template-pointing-to-udt/14489/1 "2017-06-09T21:15:06Z")

</div>

The answer may be simple, but the question is complicated. I will attempt to clarify if anything does not make sense. I am trying to hide (make invisible) a numeric label inside of a Template that references a UDT if the tag does not exist. I am using the following expression on the numeric label’s value:

if({ProcessFlow.InputTag::PV.BathTemp.DataQuality} = 404, 0, 1)

Where InputTag is the UDT reference for Furnace with the following UDT structure

Furnace

- PV (folder)  
– BathTemp (OPC Tag)

Currently, Ignition Designer shows the PV but there is something amiss:  
 ![](https://us1.discourse-cdn.com/inductiveautomation/original/2X/4/42ad078b6864d2e808c25f383aa2cd4ca6d98ad8.jpg)  
 ![](https://us1.discourse-cdn.com/inductiveautomation/original/2X/1/101750f7a0365885794c1c177e7985d4b896043c.png)

The reason why I would like to figure this out is that I want to be able utilize multiple Furnaces and if there is no PV value, then don’t show it. Maybe there is an easier way to do this.

---

<div class="post-metadata">

**Author:** ![joe.brodersen](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/joe.brodersen/32/3303_2.png) [@joe.brodersen](https://forum.inductiveautomation.com/u/joe.brodersen)\
**Post date:** [June 9, 2017, 9:31pm UTC](https://forum.inductiveautomation.com/t/expression-to-hide-label-in-template-pointing-to-udt/14489/2 "2017-06-09T21:31:13Z")

</div>

I was trying to utilize this method 😕

> [@Hiding a component if a tag does not exist](http://forum.inductiveautomation.com/t/hiding-a-component-if-a-tag-does-not-exist/9108):
>
> I am building a template that will use two slightly different UDTs when placed in a window. One of the UDTs will not have a tag and I want to hide a component that is bound to the tag if it does not exist. Is there an easy way to do this? Thanks,

---

<div class="post-metadata">

**Author:** ![AlThePal](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/althepal/32/3603_2.png) [@AlThePal](https://forum.inductiveautomation.com/u/AlThePal)\
**Post date:** [June 10, 2017, 7:18am UTC](https://forum.inductiveautomation.com/t/expression-to-hide-label-in-template-pointing-to-udt/14489/3 "2017-06-10T07:18:55Z")

</div>

I’m assuming you are using some kind of address offset in the UDT so you gather the information from different furnaces. The problem with your approach is even though you hide the tag, your system will still be trying to poll for it.

I think you will have to create 2 UDTs, one containing the PV and one not and assign the correct one to the furnace in a configuration step, otherwise your system will generate continual comms errors trying to interrogate a non-existent tag in the background.

---

<div class="post-metadata">

**Author:** ![Kleppe85](https://avatars.discourse-cdn.com/v4/letter/k/c4cdca/32.png) [@Kleppe85](https://forum.inductiveautomation.com/u/Kleppe85)\
**Post date:** [June 11, 2017, 9:56pm UTC](https://forum.inductiveautomation.com/t/expression-to-hide-label-in-template-pointing-to-udt/14489/4 "2017-06-11T21:56:10Z")

</div>

Another solution would be to disable the tag inside the UDT. Just create a script that goes through all your UDT instances, and disables the none-existing tag. You can than bind the visible property to an expression where you check “.Enabled” attribute of the tag.

---

<div class="post-metadata">

**Author:** ![joe.brodersen](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/joe.brodersen/32/3303_2.png) [@joe.brodersen](https://forum.inductiveautomation.com/u/joe.brodersen)\
**Post date:** [June 12, 2017, 5:07pm UTC](https://forum.inductiveautomation.com/t/expression-to-hide-label-in-template-pointing-to-udt/14489/5 "2017-06-12T17:07:35Z")

</div>

Thank you for the insight. @Kleppe85, along the lines of this?

> [@Disabling a Tag](http://forum.inductiveautomation.com/t/disabling-a-tag/5536):
>
> I have created a UDT and have imported 150 tags. I have linked the tags to objects like display etc. I would like to know, if there is any in which I could selectively disable a tag, during run time. In other words, when i click the display for a particular tag, a popup opens with a button to disable that particular tag, (I have created the pop-up). I was unable to access the ‘enabled’ option for the tag in question. Is there any way to disable the tag during ‘run-time’?

I have a lot more ideas I will need to mull through, so you will see quite a few questions from me in the future. 🙇‍♂️

---

<div class="post-metadata">

**Author:** ![Kleppe85](https://avatars.discourse-cdn.com/v4/letter/k/c4cdca/32.png) [@Kleppe85](https://forum.inductiveautomation.com/u/Kleppe85)\
**Post date:** [June 12, 2017, 5:49pm UTC](https://forum.inductiveautomation.com/t/expression-to-hide-label-in-template-pointing-to-udt/14489/6 "2017-06-12T17:49:25Z")

</div>

Would recommend you to use this approach instead: [https://docs.inductiveautomation.com:8443/display/DOC79/system.tag.editTag](https://docs.inductiveautomation.com:8443/display/DOC79/system.tag.editTag)
