# Displaying Alarm Total Time on Alarm Status Table

**URL:** <https://forum.inductiveautomation.com/t/displaying-alarm-total-time-on-alarm-status-table/75648>\
**Category:** Ignition\
**Tags:** ignition81, perspective\
**Created:** [June 28, 2023, 2:21pm UTC](https://forum.inductiveautomation.com/t/displaying-alarm-total-time-on-alarm-status-table/75648 "2023-06-28T14:21:43Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![Daniel\_Wade](https://avatars.discourse-cdn.com/v4/letter/d/3e96dc/32.png) [@Daniel\_Wade](https://forum.inductiveautomation.com/u/Daniel_Wade)\
**Post date:** [June 28, 2023, 2:21pm UTC](https://forum.inductiveautomation.com/t/displaying-alarm-total-time-on-alarm-status-table/75648/1 "2023-06-28T14:21:43Z")

</div>

Is there a good way to add the alarm total time (cleared time - active time = total time) as a column in an alarm status table? I've setup a "totaltime" tag within the associated data on the alarm, which has a good value, but will not display on the table.

---

<div class="post-metadata">

**Author:** ![Cameron\_Nickle](https://avatars.discourse-cdn.com/v4/letter/c/b3f665/32.png) [@Cameron\_Nickle](https://forum.inductiveautomation.com/u/Cameron_Nickle)\
**Post date:** [June 28, 2023, 2:35pm UTC](https://forum.inductiveautomation.com/t/displaying-alarm-total-time-on-alarm-status-table/75648/2 "2023-06-28T14:35:53Z")

</div>

Hi Daniel,

I believe what you're looking for can be found in the top right-hand side of the screen of the alarm status component with the little gear icon.

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/1/6/16169ee853ab1c4a404eb18a85c5854185554937.png)

If you go into that menu there are all sorts of filters you can apply to your current table. I believe the one you're looking for is 'Ack Time'. There more information over here as well : [Perspective - Alarm Status Table - Ignition User Manual 8.1 - Ignition Documentation](https://docs.inductiveautomation.com/display/DOC81/Perspective+-+Alarm+Status+Table)

---

<div class="post-metadata">

**Author:** ![Daniel\_Wade](https://avatars.discourse-cdn.com/v4/letter/d/3e96dc/32.png) [@Daniel\_Wade](https://forum.inductiveautomation.com/u/Daniel_Wade)\
**Post date:** [June 28, 2023, 6:38pm UTC](https://forum.inductiveautomation.com/t/displaying-alarm-total-time-on-alarm-status-table/75648/3 "2023-06-28T18:38:35Z")

</div>

That shows the time stamp for when the alarm is acknowledged. I need the difference in time from when the alarm was active and when the alarm is cleared/ack. I know its easy to do this in our head, but the customer wants that on the table.

In this case, the difference between the active and clear is 5.76295 minutes.

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/6/d/6dd6562421b0d33f6fd4e2bd811a335ac7809e67.png)

---

<div class="post-metadata">

**Author:** ![Cameron\_Nickle](https://avatars.discourse-cdn.com/v4/letter/c/b3f665/32.png) [@Cameron\_Nickle](https://forum.inductiveautomation.com/u/Cameron_Nickle)\
**Post date:** [June 28, 2023, 9:25pm UTC](https://forum.inductiveautomation.com/t/displaying-alarm-total-time-on-alarm-status-table/75648/4 "2023-06-28T21:25:47Z")

</div>

Ohh, I misunderstood your problem then. I'm not entirely sure how you have all of your stuff set-up but do you have a section in your perspective props that has access to all the information for a given alarm?

---

<div class="post-metadata">

**Author:** ![Daniel\_Wade](https://avatars.discourse-cdn.com/v4/letter/d/3e96dc/32.png) [@Daniel\_Wade](https://forum.inductiveautomation.com/u/Daniel_Wade)\
**Post date:** [June 29, 2023, 12:52pm UTC](https://forum.inductiveautomation.com/t/displaying-alarm-total-time-on-alarm-status-table/75648/5 "2023-06-29T12:52:03Z")

</div>

I'm not sure what you mean.

Are you talking about this section? If so, I can't add anything to do with alarms?

![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/d/8/d8718d67b42be8e29fa62885db6e4b5ccddd8681.png)

Maybe a better question about what I'm trying to do is, how do we get the table to display an associated data tag when the alarm clears vs only when the alarm triggers? I have the following setup within the alarm, and I have a label on the screen that shows the value of the TotalTime tag correctly, its just the column on the table will not show it since its NULL when the alarm activates.

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/7/a/7a23180848943d542098d5e51bad9ca8ee084294.png)

---

<div class="post-metadata">

**Author:** ![Cameron\_Nickle](https://avatars.discourse-cdn.com/v4/letter/c/b3f665/32.png) [@Cameron\_Nickle](https://forum.inductiveautomation.com/u/Cameron_Nickle)\
**Post date:** [June 29, 2023, 1:10pm UTC](https://forum.inductiveautomation.com/t/displaying-alarm-total-time-on-alarm-status-table/75648/6 "2023-06-29T13:10:01Z")

</div>

dateDiff( toDate({valuesOfInterest}), toDate({valuesOfInterest}), "minute")

I think this should do what you're after

---

<div class="post-metadata">

**Author:** ![pascal.fragnoud](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pascal.fragnoud/32/24728_2.png) [@pascal.fragnoud](https://forum.inductiveautomation.com/u/pascal.fragnoud)\
**Post date:** [June 29, 2023, 1:29pm UTC](https://forum.inductiveautomation.com/t/displaying-alarm-total-time-on-alarm-status-table/75648/7 "2023-06-29T13:29:03Z")

</div>

You can't. You'll have to make a custom table.

---

<div class="post-metadata">

**Author:** ![Daniel\_Wade](https://avatars.discourse-cdn.com/v4/letter/d/3e96dc/32.png) [@Daniel\_Wade](https://forum.inductiveautomation.com/u/Daniel_Wade)\
**Post date:** [June 29, 2023, 1:43pm UTC](https://forum.inductiveautomation.com/t/displaying-alarm-total-time-on-alarm-status-table/75648/8 "2023-06-29T13:43:57Z")

</div>

The dateDiff expression works with the values I have, and will show the time in a label.text when bound to the TotalTime value within the tag's alarm.

The problem seems to be when the alarm is triggered, the status table sets the record with the values. Since the TotalTime tag is null, it shows up blank. However, when the clear time timestamp triggers, the label with the TotalTime binding gets updated with the value I'm looking for, but the status table column stays blank.

Maybe this image will help:

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/6/e/6eb69f1f03557c7473a4b81dd2fc1204d8210399.png)

---

<div class="post-metadata">

**Author:** ![Daniel\_Wade](https://avatars.discourse-cdn.com/v4/letter/d/3e96dc/32.png) [@Daniel\_Wade](https://forum.inductiveautomation.com/u/Daniel_Wade)\
**Post date:** [June 29, 2023, 1:44pm UTC](https://forum.inductiveautomation.com/t/displaying-alarm-total-time-on-alarm-status-table/75648/9 "2023-06-29T13:44:43Z")

</div>

I was worried that was the solution. There's no way to "refresh" the table to reload the alarm values when the alarm is cleared?

---

<div class="post-metadata">

**Author:** ![pascal.fragnoud](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pascal.fragnoud/32/24728_2.png) [@pascal.fragnoud](https://forum.inductiveautomation.com/u/pascal.fragnoud)\
**Post date:** [June 29, 2023, 1:56pm UTC](https://forum.inductiveautomation.com/t/displaying-alarm-total-time-on-alarm-status-table/75648/10 "2023-06-29T13:56:02Z")

</div>

What does that have to do with what you were asking ?

---

<div class="post-metadata">

**Author:** ![Daniel\_Wade](https://avatars.discourse-cdn.com/v4/letter/d/3e96dc/32.png) [@Daniel\_Wade](https://forum.inductiveautomation.com/u/Daniel_Wade)\
**Post date:** [June 29, 2023, 3:17pm UTC](https://forum.inductiveautomation.com/t/displaying-alarm-total-time-on-alarm-status-table/75648/11 "2023-06-29T15:17:24Z")

</div>

The problem I see is, the alarm record's associated data tags do not update when the alarm clears, only when the alarm is added to the table and it does not show the value I want to display. I am wondering if there is a way to force the table or record to reset when the clear time is triggered.

I've created a pop-up window that will show the accumulated value for alarms when they are active, but the customer wants to capture the alarm's total active time on the history table.

---

<div class="post-metadata">

**Author:** ![Cameron\_Nickle](https://avatars.discourse-cdn.com/v4/letter/c/b3f665/32.png) [@Cameron\_Nickle](https://forum.inductiveautomation.com/u/Cameron_Nickle)\
**Post date:** [June 29, 2023, 3:18pm UTC](https://forum.inductiveautomation.com/t/displaying-alarm-total-time-on-alarm-status-table/75648/12 "2023-06-29T15:18:45Z")

</div>

Well if you want to refresh the table you can use some form of message handler to force a props.refresh on your table component though an event script or a button perhaps

---

<div class="post-metadata">

**Author:** ![Daniel\_Wade](https://avatars.discourse-cdn.com/v4/letter/d/3e96dc/32.png) [@Daniel\_Wade](https://forum.inductiveautomation.com/u/Daniel_Wade)\
**Post date:** [July 3, 2023, 1:55pm UTC](https://forum.inductiveautomation.com/t/displaying-alarm-total-time-on-alarm-status-table/75648/13 "2023-07-03T13:55:08Z")

</div>

Found the solution. For my alarm's "TotalTime" associated data, if I use {activeDuration} instead of the {datediff(x,x,x)} and use version 8.1.27 or greater, it will update and give the alarm active time.

There were issues identified with some alarm properties returning null that were fixed in 8.1.27.

Seems like there is still an issue with "calculation" type expressions, but the built in properties seem to work.
