# Adding Values using "if" statements

**URL:** <https://forum.inductiveautomation.com/t/adding-values-using-if-statements/38130>\
**Category:** Ignition\
**Tags:** ignition80\
**Created:** [August 27, 2020, 3:14pm UTC](https://forum.inductiveautomation.com/t/adding-values-using-if-statements/38130 "2020-08-27T15:14:53Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [August 27, 2020, 4:39pm UTC](https://forum.inductiveautomation.com/t/adding-values-using-if-statements/38130/4 "2020-08-27T16:39:03Z")

</div>

Start here:

> [@Binding to Custom Component Methods](http://forum.inductiveautomation.com/t/binding-to-custom-component-methods/19245/9):
>
> One more optimization tip: never use the tag() expression function. Wherever you think you need it, move its result to an indirect tag binding, on a custom property if necessary, and use that property’s value instead. The tag() expression function is a backwards-compatibility function with less than ideal behavior.

Then here:

> [@Nesting Not Allowed while using Properties in a Template to turn on a Light](http://forum.inductiveautomation.com/t/nesting-not-allowed-while-using-properties-in-a-template-to-turn-on-a-light/33609/16):
>
> Yes, there is. If the items that comprise your tagpath are updated, even if yielding the same result path, the entire expression containing the tag() function will have to execute. With indirect binding, this doesn’t happen. The strings themselves have to be reconstructed every time, even if not changing, slowing down the final expression execution. There are a few cases with computed gateway tags where the tag() expression is the only good way to do indirection, and the dynamic stuff above…

Follow some of the links in those posts for more.

---

_[View the full topic](https://forum.inductiveautomation.com/t/adding-values-using-if-statements/38130)._
