# A friendly guide to count alarms

**URL:** <https://forum.inductiveautomation.com/t/a-friendly-guide-to-count-alarms/31281>\
**Category:** Ignition\
**Tags:** perspective, scripting, ignition80\
**Created:** [January 14, 2020, 4:49pm UTC](https://forum.inductiveautomation.com/t/a-friendly-guide-to-count-alarms/31281 "2020-01-14T16:49:34Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![julian.medina](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/julian.medina/32/9805_2.png) [@julian.medina](https://forum.inductiveautomation.com/u/julian.medina)\
**Post date:** [January 14, 2020, 4:49pm UTC](https://forum.inductiveautomation.com/t/a-friendly-guide-to-count-alarms/31281/1 "2020-01-14T16:49:34Z")

</div>

So, I’ve been reading similar threads (like [this one](http://forum.inductiveautomation.com/t/displaying-alarm-count/15443) and [this one](http://forum.inductiveautomation.com/t/alarm-active-counter/19515)) on how to obtain the amount of current active alarms.

I know that [there are system tags already](https://docs.inductiveautomation.com/display/DOC80/System+Tags) for that , however **I need the couter separated by priority and group (folder)**. I also know that [this is possible via scripting](https://docs.inductiveautomation.com/display/DOC79/system.alarm.queryStatus), however I don’t understand how to use it.

I have doubts like:

- How should the inputs be formatted?
- What’s the output and how do I get just a count of the active alarms?
- Do I need an intermediate dataset-type tag to temporarily store the results?
- Can I filter the results by the folder the tags are in?
- How do I make sure the script is running the whole time?

And so on.  
Any help will be greatly appreciated.
