# Data type esctructure

**URL:** <https://forum.inductiveautomation.com/t/data-type-esctructure/17394>\
**Category:** Ignition\
**Tags:** ignition79\
**Created:** [March 16, 2018, 3:46pm UTC](https://forum.inductiveautomation.com/t/data-type-esctructure/17394 "2018-03-16T15:46:49Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![edwingoth](https://avatars.discourse-cdn.com/v4/letter/e/4af34b/32.png) [@edwingoth](https://forum.inductiveautomation.com/u/edwingoth)\
**Post date:** [March 16, 2018, 3:46pm UTC](https://forum.inductiveautomation.com/t/data-type-esctructure/17394/1 "2018-03-16T15:46:49Z")

</div>

Hi, can you help me? I need to write about the value of an alarm based on the activation of another alarm, I am working with one (newexpresiontag), in the option of “Expersion” I am writing the status of the alarm.

 ![](https://us1.discourse-cdn.com/inductiveautomation/original/2X/2/21d4f183785f9284315195791f522b4f1a06b2fb.PNG)

But I get left bracket error.

---

<div class="post-metadata">

**Author:** ![MMaynard](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mmaynard/32/3366_2.png) [@MMaynard](https://forum.inductiveautomation.com/u/MMaynard)\
**Post date:** [March 16, 2018, 6:33pm UTC](https://forum.inductiveautomation.com/t/data-type-esctructure/17394/2 "2018-03-16T18:33:34Z")

</div>

Take the 2000 out of the brackets.

---

<div class="post-metadata">

**Author:** ![edwingoth](https://avatars.discourse-cdn.com/v4/letter/e/4af34b/32.png) [@edwingoth](https://forum.inductiveautomation.com/u/edwingoth)\
**Post date:** [March 19, 2018, 4:27pm UTC](https://forum.inductiveautomation.com/t/data-type-esctructure/17394/3 "2018-03-19T16:27:31Z")

</div>

Hi, MMaynardUSG.

I need to add the number of times that a larm was active during a period of time of work, that is if the alarm was activated 10 times in the day, I want to count those times and write that value in a new tag.

---

<div class="post-metadata">

**Author:** ![MMaynard](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mmaynard/32/3366_2.png) [@MMaynard](https://forum.inductiveautomation.com/u/MMaynard)\
**Post date:** [March 20, 2018, 3:27pm UTC](https://forum.inductiveautomation.com/t/data-type-esctructure/17394/4 "2018-03-20T15:27:04Z")

</div>

You would have to query the alarm tables to get that information  
Something like this

> SELECT  
> a.displaypath,  
> COUNT(\*) total  
> FROM  
> alarm\_events a  
> WHERE  
> a.eventtime  
> BETWEEN '3/19/2018 00:00:00' AND '3/20/2018 00:00:00'  
> AND a.eventtype = 0  
> AND a.displaypath = 'Your Alarms Displaypath'  
> GROUP BY  
> a.displaypath  
> ORDER BY  
> total DESC

---

<div class="post-metadata">

**Author:** ![edwingoth](https://avatars.discourse-cdn.com/v4/letter/e/4af34b/32.png) [@edwingoth](https://forum.inductiveautomation.com/u/edwingoth)\
**Post date:** [March 20, 2018, 4:09pm UTC](https://forum.inductiveautomation.com/t/data-type-esctructure/17394/5 "2018-03-20T16:09:28Z")

</div>

HI, MMaynardUSG  
I do not want to count how many alarms were generated, if not the total time an alarm was active

---

<div class="post-metadata">

**Author:** ![edwingoth](https://avatars.discourse-cdn.com/v4/letter/e/4af34b/32.png) [@edwingoth](https://forum.inductiveautomation.com/u/edwingoth)\
**Post date:** [March 20, 2018, 4:12pm UTC](https://forum.inductiveautomation.com/t/data-type-esctructure/17394/6 "2018-03-20T16:12:42Z")

</div>

I want that information in a report.
