# Reporting alarm journal and tag history query

**URL:** <https://forum.inductiveautomation.com/t/reporting-alarm-journal-and-tag-history-query/103628>\
**Category:** Ignition\
**Created:** [March 13, 2025, 2:16pm UTC](https://forum.inductiveautomation.com/t/reporting-alarm-journal-and-tag-history-query/103628 "2025-03-13T14:16:05Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![milton.stathakis](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/milton.stathakis/32/73561_2.png) [@milton.stathakis](https://forum.inductiveautomation.com/u/milton.stathakis)\
**Post date:** [March 13, 2025, 2:16pm UTC](https://forum.inductiveautomation.com/t/reporting-alarm-journal-and-tag-history-query/103628/1 "2025-03-13T14:16:05Z")

</div>

I have two report data sources, an alarm journal and a tag history query.  
In my report I have a table that has the eventTime, itemName, eventState which are keys from the alarm data source. In the fourth column of this table, I would like to retrieve a tag from the historical database for the length during production, to note at what length the alarm occurred.

Should I write a script or use a nested query under the alarm\_journal or something else entirely to be able to retrieve the length at each specific eventTime.

Cheers

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [March 13, 2025, 2:38pm UTC](https://forum.inductiveautomation.com/t/reporting-alarm-journal-and-tag-history-query/103628/2 "2025-03-13T14:38:55Z")

</div>

This is a task generally accomplished with an alarm's "Associated Data". Basically, include a custom property on the alarm definition and **bind** it to the length tag. That will cause the length, as a snapshot at the time of alarm, to be placed into the alarm history details table and associated with the alarm event. No need to do a history query.

---

<div class="post-metadata">

**Author:** ![milton.stathakis](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/milton.stathakis/32/73561_2.png) [@milton.stathakis](https://forum.inductiveautomation.com/u/milton.stathakis)\
**Post date:** [March 13, 2025, 2:42pm UTC](https://forum.inductiveautomation.com/t/reporting-alarm-journal-and-tag-history-query/103628/3 "2025-03-13T14:42:01Z")

</div>

Thank you!
