# Alarms from multiple projects

**URL:** <https://forum.inductiveautomation.com/t/alarms-from-multiple-projects/11675>\
**Category:** Ignition\
**Created:** [May 16, 2016, 10:13pm UTC](https://forum.inductiveautomation.com/t/alarms-from-multiple-projects/11675 "2016-05-16T22:13:32Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![the\_msp](https://avatars.discourse-cdn.com/v4/letter/t/b38774/32.png) [@the\_msp](https://forum.inductiveautomation.com/u/the_msp)\
**Post date:** [May 16, 2016, 10:13pm UTC](https://forum.inductiveautomation.com/t/alarms-from-multiple-projects/11675/1 "2016-05-16T22:13:32Z")

</div>

I have multiples projects on one gateway (7.8.2). Each project is unique to each machine which are dissimilar from each other.

I have a “master project” which redirects to all the individual projects, to let management log in to the one project and not have to logout, launch, log in, etc

I have created a template with each project name, a symbol for the process, and a script which redirects to the relevant project. Once a machine project is launched, you can get back to the master with a home button in the navigation dock.

I want to add to the template an alarm status for each project. Can this be done?

Having a quick look my thoughts are to create an alarm journal for each machine (project) and then have the master (project) filter the journal name.

---

<div class="post-metadata">

**Author:** ![WillMT10](https://avatars.discourse-cdn.com/v4/letter/w/7feea3/32.png) [@WillMT10](https://forum.inductiveautomation.com/u/WillMT10)\
**Post date:** [May 19, 2016, 6:14pm UTC](https://forum.inductiveautomation.com/t/alarms-from-multiple-projects/11675/2 "2016-05-19T18:14:22Z")

</div>

You should be able to use the “Source Filter”, “Provider Filter”, and “Display Path Filter” properties on the Alarm Journal component to get what you want (same thing for the “Alarm Status Table” component). Keep in mind that you can use the \* wildcard on these filters. So you could have a source filter of “_Machine1_”, without the quotes, to get all the alarms that have a source path with “Machine1” in the path.

Good luck,  
-Will

---

<div class="post-metadata">

**Author:** ![the\_msp](https://avatars.discourse-cdn.com/v4/letter/t/b38774/32.png) [@the\_msp](https://forum.inductiveautomation.com/u/the_msp)\
**Post date:** [May 20, 2016, 9:20am UTC](https://forum.inductiveautomation.com/t/alarms-from-multiple-projects/11675/3 "2016-05-20T09:20:23Z")

</div>

Thanks Will. I have created an alarm journal component page in each project and am using the “Search string” to filter only alarms relevant to that project.

In the master project I would like the “Alarm count label” in the navigation pane to show the sum of all alarms for all projects, but in the template for each project I would like it to only count for that alarm. If I copy and paste the template, rename it, any tips on how to add a filter into that code so it only counts for the associated project? (I already have a custom property for project name/path)

Thanks

---

<div class="post-metadata">

**Author:** ![WillMT10](https://avatars.discourse-cdn.com/v4/letter/w/7feea3/32.png) [@WillMT10](https://forum.inductiveautomation.com/u/WillMT10)\
**Post date:** [May 20, 2016, 6:01pm UTC](https://forum.inductiveautomation.com/t/alarms-from-multiple-projects/11675/4 "2016-05-20T18:01:39Z")

</div>

I would think you could use the system.alarm.queryStatus function to get a count of what you are looking for. You can pass in filters to this function to only retrieve the alarms you are looking for. Then you should be able to count the number of items in the result and display that as the number of active alarms. It wouldn’t be perfect since you would have to put it on a timer script to constantly recheck the number of active alarms. Maybe create separate gateway scripts that run every 10 seconds (or whatever you need) and write the alarm count to some tags? Just a thought.

-Will

---

<div class="post-metadata">

**Author:** ![the\_msp](https://avatars.discourse-cdn.com/v4/letter/t/b38774/32.png) [@the\_msp](https://forum.inductiveautomation.com/u/the_msp)\
**Post date:** [May 24, 2016, 3:51pm UTC](https://forum.inductiveautomation.com/t/alarms-from-multiple-projects/11675/5 "2016-05-24T15:51:36Z")

</div>

Sorted! Thanks

One per project:

`x = system.alarm.queryStatus(displaypath=["*FT*"], state=["ActiveUnacked", "ActiveAcked"])
list = x.getDataset()
print list
y = system.dataset.toPyDataSet(list)
print len(y)
system.tag.write('FT Alarm count', len(y))`

---

<div class="post-metadata">

**Author:** ![jsmoral](https://avatars.discourse-cdn.com/v4/letter/j/13edae/32.png) [@jsmoral](https://forum.inductiveautomation.com/u/jsmoral)\
**Post date:** [November 9, 2017, 2:18pm UTC](https://forum.inductiveautomation.com/t/alarms-from-multiple-projects/11675/6 "2017-11-09T14:18:59Z")

</div>

Thanks, the\_msp

For me worked with  
x = system.alarm.queryStatus(source=[""], state=[“ActiveUnacked”, “ActiveAcked”])

Where xxxxxxx is a substring of the tag path.

---

<div class="post-metadata">

**Author:** ![Abiodun.Martins](https://avatars.discourse-cdn.com/v4/letter/a/bc79bd/32.png) [@Abiodun.Martins](https://forum.inductiveautomation.com/u/Abiodun.Martins)\
**Post date:** [April 10, 2020, 8:15am UTC](https://forum.inductiveautomation.com/t/alarms-from-multiple-projects/11675/7 "2020-04-10T08:15:54Z")

</div>

Good Morning,  
In using this code where is appropriate to use it, on the root container of the alarm status table? right clicking to select scripting? and what is best way to arrange this code?

---

<div class="post-metadata">

**Author:** ![Matrix\_Engineering](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/matrix_engineering/32/19781_2.png) [@Matrix\_Engineering](https://forum.inductiveautomation.com/u/Matrix_Engineering)\
**Post date:** [April 10, 2020, 8:33am UTC](https://forum.inductiveautomation.com/t/alarms-from-multiple-projects/11675/8 "2020-04-10T08:33:29Z")

</div>

I will re-create this for you but it won’t be today.

From memory I had a template on my master project and the alarm status template (that comes from IA as default) was used to show a new summary for each sub-project of the master project.

---

<div class="post-metadata">

**Author:** ![Abiodun.Martins](https://avatars.discourse-cdn.com/v4/letter/a/bc79bd/32.png) [@Abiodun.Martins](https://forum.inductiveautomation.com/u/Abiodun.Martins)\
**Post date:** [April 10, 2020, 9:51am UTC](https://forum.inductiveautomation.com/t/alarms-from-multiple-projects/11675/9 "2020-04-10T09:51:06Z")

</div>

Thank you. I will be expecting?

---

<div class="post-metadata">

**Author:** ![Matrix\_Engineering](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/matrix_engineering/32/19781_2.png) [@Matrix\_Engineering](https://forum.inductiveautomation.com/u/Matrix_Engineering)\
**Post date:** [April 10, 2020, 9:55am UTC](https://forum.inductiveautomation.com/t/alarms-from-multiple-projects/11675/10 "2020-04-10T09:55:37Z")

</div>

Monday next week.

---

<div class="post-metadata">

**Author:** ![Abiodun.Martins](https://avatars.discourse-cdn.com/v4/letter/a/bc79bd/32.png) [@Abiodun.Martins](https://forum.inductiveautomation.com/u/Abiodun.Martins)\
**Post date:** [April 13, 2020, 10:36am UTC](https://forum.inductiveautomation.com/t/alarms-from-multiple-projects/11675/11 "2020-04-13T10:36:55Z")

</div>

Good Morning

Reminder!!!

Thank you

---

<div class="post-metadata">

**Author:** ![Matrix\_Engineering](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/matrix_engineering/32/19781_2.png) [@Matrix\_Engineering](https://forum.inductiveautomation.com/u/Matrix_Engineering)\
**Post date:** [April 13, 2020, 10:39am UTC](https://forum.inductiveautomation.com/t/alarms-from-multiple-projects/11675/12 "2020-04-13T10:39:38Z")

</div>

Morning!

Thanks for the reminder. It’s a bank holiday here, and just coming up to noon.

If you can wait (up to) another 12 hours so I can enjoy some of the bank holiday sun, it would be most appreciated 🙂

---

<div class="post-metadata">

**Author:** ![Abiodun.Martins](https://avatars.discourse-cdn.com/v4/letter/a/bc79bd/32.png) [@Abiodun.Martins](https://forum.inductiveautomation.com/u/Abiodun.Martins)\
**Post date:** [April 13, 2020, 12:33pm UTC](https://forum.inductiveautomation.com/t/alarms-from-multiple-projects/11675/13 "2020-04-13T12:33:01Z")

</div>

Alright. I will wait. Enjoy the holiday

---

<div class="post-metadata">

**Author:** ![Matrix\_Engineering](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/matrix_engineering/32/19781_2.png) [@Matrix\_Engineering](https://forum.inductiveautomation.com/u/Matrix_Engineering)\
**Post date:** [April 13, 2020, 6:52pm UTC](https://forum.inductiveautomation.com/t/alarms-from-multiple-projects/11675/14 "2020-04-13T18:52:44Z")

</div>

Please see attached image for placement of above script, for formatting it is re-pasted below although it’s all left indented anyway

In the image you can see the FT filter on the alarm journal table

I had a template made to only show alarms for project X, or Y, etc

 ![Ignition%20Alarm%20Filtering](https://us1.discourse-cdn.com/inductiveautomation/original/2X/a/aa64698b9b57f9fb37ab18b2b47d13e4fc70378f.png)

```auto
FTx = system.alarm.queryStatus(displaypath=["*FT*"], state=["ActiveUnacked", "ActiveAcked"])
FTlist = FTx.getDataset()
print FTlist
FTy = system.dataset.toPyDataSet(FTlist)
print len(FTy)
system.tag.write('FT Alarm count', len(FTy))

```

---

<div class="post-metadata">

**Author:** ![Abiodun.Martins](https://avatars.discourse-cdn.com/v4/letter/a/bc79bd/32.png) [@Abiodun.Martins](https://forum.inductiveautomation.com/u/Abiodun.Martins)\
**Post date:** [April 14, 2020, 9:15am UTC](https://forum.inductiveautomation.com/t/alarms-from-multiple-projects/11675/15 "2020-04-14T09:15:17Z")

</div>

Thank you, what i really needed was that when i click any of the machines, it will pop up more details of the machine with it alarm count button and if i click the button it brings up the alarm status of that particular machine alarm?

---

<div class="post-metadata">

**Author:** ![Abiodun.Martins](https://avatars.discourse-cdn.com/v4/letter/a/bc79bd/32.png) [@Abiodun.Martins](https://forum.inductiveautomation.com/u/Abiodun.Martins)\
**Post date:** [April 14, 2020, 9:49am UTC](https://forum.inductiveautomation.com/t/alarms-from-multiple-projects/11675/16 "2020-04-14T09:49:03Z")

</div>

You might give me your contact for better clearification. Thank you for the effort so far.

---

<div class="post-metadata">

**Author:** ![Matrix\_Engineering](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/matrix_engineering/32/19781_2.png) [@Matrix\_Engineering](https://forum.inductiveautomation.com/u/Matrix_Engineering)\
**Post date:** [April 14, 2020, 12:35pm UTC](https://forum.inductiveautomation.com/t/alarms-from-multiple-projects/11675/17 "2020-04-14T12:35:21Z")

</div>

That’s all possible using templates etc, have you checked out Inductive University?

---

<div class="post-metadata">

**Author:** ![Abiodun.Martins](https://avatars.discourse-cdn.com/v4/letter/a/bc79bd/32.png) [@Abiodun.Martins](https://forum.inductiveautomation.com/u/Abiodun.Martins)\
**Post date:** [April 14, 2020, 3:34pm UTC](https://forum.inductiveautomation.com/t/alarms-from-multiple-projects/11675/18 "2020-04-14T15:34:28Z")

</div>

Yes i have and i have seen in extension function but didn’t get the right way to do it, maybe you can help? [https://docs.inductiveautomation.com/display/DOC79/system.alarm.queryStatus](https://docs.inductiveautomation.com/display/DOC79/system.alarm.queryStatus)

---

<div class="post-metadata">

**Author:** ![Matrix\_Engineering](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/matrix_engineering/32/19781_2.png) [@Matrix\_Engineering](https://forum.inductiveautomation.com/u/Matrix_Engineering)\
**Post date:** [April 14, 2020, 3:42pm UTC](https://forum.inductiveautomation.com/t/alarms-from-multiple-projects/11675/19 "2020-04-14T15:42:02Z")

</div>

Sure but today is another bank holiday here.

Give me a week or so.

---

<div class="post-metadata">

**Author:** ![Abiodun.Martins](https://avatars.discourse-cdn.com/v4/letter/a/bc79bd/32.png) [@Abiodun.Martins](https://forum.inductiveautomation.com/u/Abiodun.Martins)\
**Post date:** [April 29, 2020, 4:23pm UTC](https://forum.inductiveautomation.com/t/alarms-from-multiple-projects/11675/20 "2020-04-29T16:23:20Z")

</div>

i waited for your reply but did not see.

[Next page](https://forum.inductiveautomation.com/t/alarms-from-multiple-projects/11675.md?page=2)
