# Sum the value of 2 tags

**URL:** <https://forum.inductiveautomation.com/t/sum-the-value-of-2-tags/5013>\
**Category:** Ignition\
**Created:** [August 15, 2012, 10:25pm UTC](https://forum.inductiveautomation.com/t/sum-the-value-of-2-tags/5013 "2012-08-15T22:25:49Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![seancourtney](https://avatars.discourse-cdn.com/v4/letter/s/43a26b/32.png) [@seancourtney](https://forum.inductiveautomation.com/u/seancourtney)\
**Post date:** [August 15, 2012, 10:25pm UTC](https://forum.inductiveautomation.com/t/sum-the-value-of-2-tags/5013/1 "2012-08-15T22:25:49Z")

</div>

i am trying to sum the value of 2 tags when a button is clicked.

I have tried to use the event handler when mouse clicked, but i cant seem to get the syntax correct.

anyone have any ideas?

thanks in advance.

---

<div class="post-metadata">

**Author:** ![Travis.Cox](https://avatars.discourse-cdn.com/v4/letter/t/b9bd4f/32.png) [@Travis.Cox](https://forum.inductiveautomation.com/u/Travis.Cox)\
**Post date:** [August 15, 2012, 10:27pm UTC](https://forum.inductiveautomation.com/t/sum-the-value-of-2-tags/5013/2 "2012-08-15T22:27:14Z")

</div>

Here is an example:[code]value1 = system.tag.getTagValue(“Path/To/Tag1”)  
value2 = system.tag.getTagValue(“Path/To/Tag2”)

sum = value1 + value2

# do something with sum[/code]

---

<div class="post-metadata">

**Author:** ![seancourtney](https://avatars.discourse-cdn.com/v4/letter/s/43a26b/32.png) [@seancourtney](https://forum.inductiveautomation.com/u/seancourtney)\
**Post date:** [August 15, 2012, 10:29pm UTC](https://forum.inductiveautomation.com/t/sum-the-value-of-2-tags/5013/3 "2012-08-15T22:29:22Z")

</div>

wow that was fast!!

thanks travis
