# Using the Alarm Active tag event script

**URL:** <https://forum.inductiveautomation.com/t/using-the-alarm-active-tag-event-script/12605>\
**Category:** Ignition\
**Created:** [January 26, 2017, 1:55pm UTC](https://forum.inductiveautomation.com/t/using-the-alarm-active-tag-event-script/12605 "2017-01-26T13:55:40Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![CJVR](https://avatars.discourse-cdn.com/v4/letter/c/0ea827/32.png) [@CJVR](https://forum.inductiveautomation.com/u/CJVR)\
**Post date:** [January 26, 2017, 1:55pm UTC](https://forum.inductiveautomation.com/t/using-the-alarm-active-tag-event-script/12605/1 "2017-01-26T13:55:40Z")

</div>

I am trying to use the alarmActive tag event to generate a custom e-mail. When I try to use properties of the alarmEvent object I get an error.

Here is my code:

`eventTime = system.date.format(system.date.now(), 'h:m:s a')
displayPath = alarmEvent.displayPath
emailBody = "<b>" + alarmName + "</b> on <b>" + displayPath + "</b> went into alarm at " + eventTime + "."
recipients = ["ZZZZ"]
system.net.sendEmail(smtp="XXXX", fromAddr="YYYY", subject="Ignition Alarm Notification", body=emailBody, to=recipients, html=1)
`  
And here is the error:

Error executing tag event script: Traceback (most recent call last): File “”, line 4, in alarmActive TypeError: cannot concatenate ‘str’ and ‘com.inductiveautomation.ignition.common.StringPath’ objects (this is the emailBody = line).

It appears that alarmEvent.displayPath is not a string. What is it and how do I make it a string? ![:scratch:](https://us1.discourse-cdn.com/inductiveautomation/original/1X/76d1620bec252bfac07050c889ff5a91dc8a9c25.gif ":scratch:")

---

<div class="post-metadata">

**Author:** ![jpark](https://avatars.discourse-cdn.com/v4/letter/j/a88e57/32.png) [@jpark](https://forum.inductiveautomation.com/u/jpark)\
**Post date:** [January 27, 2017, 3:26am UTC](https://forum.inductiveautomation.com/t/using-the-alarm-active-tag-event-script/12605/2 "2017-01-27T03:26:06Z")

</div>

```auto
displayPath = str(alarmEvent.displayPath)
```
