# Why does the system.alarm.queryJournal() function have different event/state filters than the Perspective Alarm Journal Table component?

**URL:** <https://forum.inductiveautomation.com/t/why-does-the-system-alarm-queryjournal-function-have-different-event-state-filters-than-the-perspective-alarm-journal-table-component/88771>\
**Category:** Ignition\
**Tags:** ignition81, perspective\
**Created:** [April 13, 2024, 8:05am UTC](https://forum.inductiveautomation.com/t/why-does-the-system-alarm-queryjournal-function-have-different-event-state-filters-than-the-perspective-alarm-journal-table-component/88771 "2024-04-13T08:05:09Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![tyler.bennett](https://avatars.discourse-cdn.com/v4/letter/t/f04885/32.png) [@tyler.bennett](https://forum.inductiveautomation.com/u/tyler.bennett)\
**Post date:** [April 13, 2024, 8:05am UTC](https://forum.inductiveautomation.com/t/why-does-the-system-alarm-queryjournal-function-have-different-event-state-filters-than-the-perspective-alarm-journal-table-component/88771/1 "2024-04-13T08:05:09Z")

</div>

Can any one explain to me why the Perspective [Alarm Journal Table](https://www.docs.inductiveautomation.com/docs/8.1/appendix/components/perspective-components/perspective-display-palette/perspective-alarm-journal-table#filter-properties) component allows one to filter by these event types...

- **active** : Whether to display alarm events with active states. Default is true.
- **acked** : Whether to display alarm events with acked states. Default is true.
- **cleared** : Whether to display alarm events with cleared states. Default is true.
- **enabled** : Whether to display alarm events that were generated by enabling an alarm.
- **disabled** : Whether to display alarm events that were generated by disabling an alarm.

...which match [event types recorded in the Alarm Journal database table](https://www.docs.inductiveautomation.com/docs/8.1/platform/alarming/alarm-journal#table-definitions) (alarm\_events)...

- 0: Active
- 1: Clear
- 2: Acknowledgement
- 4: An alarm was enabled
- 5: An alarm was disabled

...but the [system.alarm.queryJournal()](https://www.docs.inductiveautomation.com/docs/8.1/appendix/scripting-functions/system-alarm/system-alarm-queryJournal#state-parameter-values) function requires you to filter by these combination states?

| String Representation | Integer Representation |
| --- | --- |
| ClearUnacked | 0 |
| ClearAcked | 1 |
| ActiveUnacked | 2 |
| ActiveAcked | 3 |
| Enabled | 4 |
| Disabled | 5 |

I'm attempting to make an Alarm Journal export button/script that uses the filter settings from a Perspective `Alarm Journal Table` component and the `system.alarm.queryJournal()` function to export data (in Excel format) matching data presented in the `Alarm Journal Table` component.

It seems to be an odd difference/deviation and I'm wondering if it might actually be a mistake in the documentation for [system.alarm.queryJournal()](https://www.docs.inductiveautomation.com/docs/8.1/appendix/scripting-functions/system-alarm/system-alarm-queryJournal#state-parameter-values) .
