# Where is 'system.alarm.queryStatus'

**URL:** <https://forum.inductiveautomation.com/t/where-is-system-alarm-querystatus/32203>\
**Category:** Ignition\
**Tags:** ignition80\
**Created:** [February 12, 2020, 11:44pm UTC](https://forum.inductiveautomation.com/t/where-is-system-alarm-querystatus/32203 "2020-02-12T23:44:43Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![David.Reed.Schmidt](https://avatars.discourse-cdn.com/v4/letter/d/5f9b8f/32.png) [@David.Reed.Schmidt](https://forum.inductiveautomation.com/u/David.Reed.Schmidt)\
**Post date:** [February 12, 2020, 11:44pm UTC](https://forum.inductiveautomation.com/t/where-is-system-alarm-querystatus/32203/1 "2020-02-12T23:44:43Z")

</div>

I’m attempting to run the following script:

```auto
results = system.alarm.queryStatus(source=["*HiAlarm*"])

```

but I get the following error:

_AttributeError: ‘com.inductiveautomation.ignition.designer.gui.tool’ object has no attribute ‘queryStatus’_

I ran the following code:

```auto
import system.alarm
print dir(system.alarm)

```

and the queryStatus was not an included method!

Bottom line is that I’m trying to derive a _boolean_ result from a folder any time there are any alarms present in the tags inside that folder.

For what its work the documentation for Ignition 8 still has this as a part of the documentation in the scripting section.

---

<div class="post-metadata">

**Author:** ![cmallonee](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/cmallonee/32/6416_2.png) [@cmallonee](https://forum.inductiveautomation.com/u/cmallonee)\
**Post date:** [February 12, 2020, 11:46pm UTC](https://forum.inductiveautomation.com/t/where-is-system-alarm-querystatus/32203/2 "2020-02-12T23:46:33Z")

</div>

Why did you import `system.alarm`? There is no need to do that.

 ![10%20PM](https://us1.discourse-cdn.com/inductiveautomation/original/2X/0/0d3d9f1e79bf26dbfc6eff63c9b7e3a750bb1785.png)

Could you share more of your code? The error you’ve shared leads me to believe that you’ve assigned a value to `system.alarm`.

With the following code I was able to get an error approximating your issue:

```auto
system = {}
system['alarm'] = system.gui
self.custom.result = system.alarm.queryStatus(source='[default]')

```

My error:  
 ![09%20PM](https://us1.discourse-cdn.com/inductiveautomation/original/2X/7/74933091ec6e5dfefea62863fba2939711e68534.png)

---

<div class="post-metadata">

**Author:** ![osolorzano](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/osolorzano/32/6432_2.png) [@osolorzano](https://forum.inductiveautomation.com/u/osolorzano)\
**Post date:** [February 13, 2020, 12:53am UTC](https://forum.inductiveautomation.com/t/where-is-system-alarm-querystatus/32203/3 "2020-02-13T00:53:55Z")

</div>

It would also help to know where you are trying to run this script. (ie. a Perspective button event, an SFC script block, a gateway startup script, etc.)

---

<div class="post-metadata">

**Author:** ![David.Reed.Schmidt](https://avatars.discourse-cdn.com/v4/letter/d/5f9b8f/32.png) [@David.Reed.Schmidt](https://forum.inductiveautomation.com/u/David.Reed.Schmidt)\
**Post date:** [February 13, 2020, 4:05am UTC](https://forum.inductiveautomation.com/t/where-is-system-alarm-querystatus/32203/4 "2020-02-13T04:05:06Z")

</div>

I am running the code in a project script.Also my list is different than the image from the reply above. There is no alarm.queryStatus

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [February 13, 2020, 4:45am UTC](https://forum.inductiveautomation.com/t/where-is-system-alarm-querystatus/32203/5 "2020-02-13T04:45:52Z")

</div>

If you don’t have the Vision module installed this function is only available in the gateway scope.

---

<div class="post-metadata">

**Author:** ![David.Reed.Schmidt](https://avatars.discourse-cdn.com/v4/letter/d/5f9b8f/32.png) [@David.Reed.Schmidt](https://forum.inductiveautomation.com/u/David.Reed.Schmidt)\
**Post date:** [February 13, 2020, 5:18am UTC](https://forum.inductiveautomation.com/t/where-is-system-alarm-querystatus/32203/6 "2020-02-13T05:18:05Z")

</div>

So if I only have perspective then how can I run scripts in a global scope? I thought all scripts were project scoped but projects were inherited if set to do so. Also the docs for system.alarm.queryStatus says that is it available thru perspective.

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [February 13, 2020, 2:44pm UTC](https://forum.inductiveautomation.com/t/where-is-system-alarm-querystatus/32203/7 "2020-02-13T14:44:16Z")

</div>

“Global” isn’t a scope. Scope isn’t defined by where you wrote the code, it’s where you are executing the code from.

From the snippet of error message you posted I’d guess you were trying to run it from the designer script console or something.

This function is available for use in Perspective, but you have to actually execute from Perspective (which is gateway scoped). Put it on a Perspective button and press it.
