# Calculated Contacts

**URL:** <https://forum.inductiveautomation.com/t/calculated-contacts/28304>\
**Category:** Ignition\
**Created:** [September 16, 2019, 10:40pm UTC](https://forum.inductiveautomation.com/t/calculated-contacts/28304 "2019-09-16T22:40:13Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![r123](https://avatars.discourse-cdn.com/v4/letter/r/838e76/32.png) [@r123](https://forum.inductiveautomation.com/u/r123)\
**Post date:** [September 16, 2019, 10:40pm UTC](https://forum.inductiveautomation.com/t/calculated-contacts/28304/1 "2019-09-16T22:40:13Z")

</div>

The manual says: “This can be really useful as it can allow you to add users one at a time, making use of flow control methods like a for loop. You can then use external information, such as database records or Ignition’s built in user and security functions to determine who to add.”

I don’t see the insert tag or property value icons and when I try to type them in they don’t seem to work. Like {[default]User1} works on a numeric label but not in the Calculated Contacts. The manual shows everything but in the examples.

---

<div class="post-metadata">

**Author:** ![witman](https://avatars.discourse-cdn.com/v4/letter/w/d2c977/32.png) [@witman](https://forum.inductiveautomation.com/u/witman)\
**Post date:** [September 17, 2019, 12:24am UTC](https://forum.inductiveautomation.com/t/calculated-contacts/28304/2 "2019-09-17T00:24:55Z")

</div>

The syntax you gave is used in [expressions](https://docs.inductiveautomation.com/display/DOC80/Expression+Overview+and+Syntax) while this feature uses [Jython scripting](https://docs.inductiveautomation.com/display/DOC80/Scripting). Use [scripting functions to read and write tags](https://docs.inductiveautomation.com/display/DOC80/Reading+and+Writing+to+Tags) here.

---

<div class="post-metadata">

**Author:** ![r123](https://avatars.discourse-cdn.com/v4/letter/r/838e76/32.png) [@r123](https://forum.inductiveautomation.com/u/r123)\
**Post date:** [September 17, 2019, 2:31pm UTC](https://forum.inductiveautomation.com/t/calculated-contacts/28304/3 "2019-09-17T14:31:31Z")

</div>

Thanks, I did find that last night. I get lost in all the places you can put code and what type can be used. I wonder if they could color code it or something?

---

<div class="post-metadata">

**Author:** ![r123](https://avatars.discourse-cdn.com/v4/letter/r/838e76/32.png) [@r123](https://forum.inductiveautomation.com/u/r123)\
**Post date:** [September 17, 2019, 3:44pm UTC](https://forum.inductiveautomation.com/t/calculated-contacts/28304/4 "2019-09-17T15:44:08Z")

</div>

I don’t suppose there is a way to get the Alarm Properties in the expression?

---

<div class="post-metadata">

**Author:** ![witman](https://avatars.discourse-cdn.com/v4/letter/w/d2c977/32.png) [@witman](https://forum.inductiveautomation.com/u/witman)\
**Post date:** [September 17, 2019, 4:45pm UTC](https://forum.inductiveautomation.com/t/calculated-contacts/28304/5 "2019-09-17T16:45:29Z")

</div>

> [@r123](#):
>
> places you can put code and what type can be used. I wonder if they could color code it or something?

It'll become obvious once you're used to it--Jython/Python doesn't look much like the expression language. One tip that may help is comments in expressions are denoted by double slashes `//` while comments in Python are denoted by the pound/hash sign `#`.

---

<div class="post-metadata">

**Author:** ![witman](https://avatars.discourse-cdn.com/v4/letter/w/d2c977/32.png) [@witman](https://forum.inductiveautomation.com/u/witman)\
**Post date:** [September 17, 2019, 4:59pm UTC](https://forum.inductiveautomation.com/t/calculated-contacts/28304/6 "2019-09-17T16:59:53Z")

</div>

> [@r123](#):
>
> I don’t suppose there is a way to get the Alarm Properties in the expression?

You mean in the script (not expression)? If so, the bottom point here is the key:  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/2X/8/8c7a2570117953397d3d0cdc208559f67e225eca.png)  
The `event` object contains the alarm properties. I haven't played with this to confirm, but I expect you'd access them via something like `event.propertyName` or `event.get('propertyName')`.
