# Alarm Journal Table: Label field displays incorrectly

**URL:** <https://forum.inductiveautomation.com/t/alarm-journal-table-label-field-displays-incorrectly/18929>\
**Category:** Ignition\
**Tags:** ignition79\
**Created:** [July 23, 2018, 10:23am UTC](https://forum.inductiveautomation.com/t/alarm-journal-table-label-field-displays-incorrectly/18929 "2018-07-23T10:23:24Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![pgmo](https://avatars.discourse-cdn.com/v4/letter/p/d07c76/32.png) [@pgmo](https://forum.inductiveautomation.com/u/pgmo)\
**Post date:** [July 23, 2018, 10:23am UTC](https://forum.inductiveautomation.com/t/alarm-journal-table-label-field-displays-incorrectly/18929/1 "2018-07-23T10:23:24Z")

</div>

Hi all,  
I’m using an **Alarm Status Table** to show real time alarms and an **Alarm Journal Table** to show the alarm history.  
My alarms are **Bit State** alarms. The text that is to be displayed to the operator is split between the `Label` and the `Display Path` alarm fields.  
I’m experiencing the following issue: the alarm shows up correctly in the _Alarm Status Table_ such as in the following screen capture

![](https://us1.discourse-cdn.com/inductiveautomation/original/2X/e/ea1b6f739d202c3aaa3df7433e7b0a8587065de4.png)

where you can see the `Active Time`, `Label`, `Display Path` fields, whereas the same alarm shows up as in the following screen capture in the _Alarm Journal Table_  
 ![](https://us1.discourse-cdn.com/inductiveautomation/original/2X/7/79fc604a1f94fa84070ed2240d51aa7ff8ac25e7.png)  
where _AlmBit25_ is the alarm `Name` instead of the `Label` field.

Any suggestion?

Ignition version: 7.9.8 (b2018060714)

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [July 23, 2018, 3:22pm UTC](https://forum.inductiveautomation.com/t/alarm-journal-table-label-field-displays-incorrectly/18929/2 "2018-07-23T15:22:52Z")

</div>

If the Label field is populated with a static value, you will need to ensure that your alarm journal is set to store “Static Config” - see the reference properties here: [https://docs.inductiveautomation.com/display/DOC79/Journal+Properties+and+Tables](https://docs.inductiveautomation.com/display/DOC79/Journal+Properties+and+Tables)

Basically, because the alarm journal is _entirely_ database driven, if you enter a static alarm label, there’s no way for the journal table to reference a value for the label field - unless you tell the journal to store that static config as well (or, more DB-space efficiently, just make the value “dynamic” with an expression like `"[DB1001.DBD56] - NB7_D56"`).

---

<div class="post-metadata">

**Author:** ![r.lebohec](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/r.lebohec/32/3704_2.png) [@r.lebohec](https://forum.inductiveautomation.com/u/r.lebohec)\
**Post date:** [October 8, 2018, 8:12am UTC](https://forum.inductiveautomation.com/t/alarm-journal-table-label-field-displays-incorrectly/18929/3 "2018-10-08T08:12:35Z")

</div>

Hi @paul-griffith,@pgmo,

Moreover when I call **system.alarm.queryJournal** function, all event object have ‘Label’ property in AlarmQueryResults except **ACKED** AlarmEvent.

 ![](https://us1.discourse-cdn.com/inductiveautomation/original/2X/5/5dac6ca08bef5e8713e2265b59f157b67967b75e.PNG)

Ignition version: 7.9.8 (b2018060714)

---

<div class="post-metadata">

**Author:** ![pat.stave1](https://avatars.discourse-cdn.com/v4/letter/p/f19dbf/32.png) [@pat.stave1](https://forum.inductiveautomation.com/u/pat.stave1)\
**Post date:** [November 25, 2018, 3:23pm UTC](https://forum.inductiveautomation.com/t/alarm-journal-table-label-field-displays-incorrectly/18929/4 "2018-11-25T15:23:07Z")

</div>

@paul-griffith:

Bringing this up again, the “static config” works for all events except the acked event. The ack event does not store the static text in the journal.

In this example all events are from the same alarm. The ack does not show the static label:

 ![](https://us1.discourse-cdn.com/inductiveautomation/original/2X/9/9985e4730a0861002a6f83ae4e0e5a1445496e31.png)

---

<div class="post-metadata">

**Author:** ![ashkan.pashaie](https://avatars.discourse-cdn.com/v4/letter/a/a587f6/32.png) [@ashkan.pashaie](https://forum.inductiveautomation.com/u/ashkan.pashaie)\
**Post date:** [December 6, 2018, 6:53pm UTC](https://forum.inductiveautomation.com/t/alarm-journal-table-label-field-displays-incorrectly/18929/5 "2018-12-06T18:53:07Z")

</div>

Has this been investigated by Ignition? I’m having the same problem and “Static Config” has been checked. Works great for Alarm Status display. Works well for Alarm Journal except when the alarms are being ack’d!!

Need a fix guys.

Thank you.

 ![](https://us1.discourse-cdn.com/inductiveautomation/original/2X/7/7375d30a9464fc09754a0134008fefce18fc626b.png)

I’m running the report on alarm history as well and the problem exists the same way. So I’m assuming the problem comes from when the acknowledge action is written to database!

 ![](https://us1.discourse-cdn.com/inductiveautomation/original/2X/e/eb8fb9a1e1db3d80744c76e7db62c2903fe8fe19.png)

---

<div class="post-metadata">

**Author:** ![SamuelsenLarsen](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/samuelsenlarsen/32/11901_2.png) [@SamuelsenLarsen](https://forum.inductiveautomation.com/u/SamuelsenLarsen)\
**Post date:** [March 14, 2019, 7:53pm UTC](https://forum.inductiveautomation.com/t/alarm-journal-table-label-field-displays-incorrectly/18929/6 "2019-03-14T19:53:03Z")

</div>

I’am have the same problem…

 ![2019-03-14_20-49-38](https://us1.discourse-cdn.com/inductiveautomation/original/2X/6/6d0aa9738cd6c694680b730627e60993e72db4a0.jpeg)

---

<div class="post-metadata">

**Author:** ![r.lebohec](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/r.lebohec/32/3704_2.png) [@r.lebohec](https://forum.inductiveautomation.com/u/r.lebohec)\
**Post date:** [April 2, 2019, 1:08pm UTC](https://forum.inductiveautomation.com/t/alarm-journal-table-label-field-displays-incorrectly/18929/7 "2019-04-02T13:08:55Z")

</div>

A workaround before it was fix in future Ignition delivery …

Make a MySQL NamedQuery Trigger with this params: **{“dbName”:“histo”,“tableName”: “alarm\_events”,“dataTableName” : “alarm\_event\_data”}** and execute this query on Gateway Startup Script

```auto
CREATE TRIGGER `{dbName}`.`{tableName}_AFTER_INSERT` AFTER INSERT ON `{tableName}` FOR EACH ROW
BEGIN

	DECLARE propId INT;
	DECLARE eventid varchar(255);

			
	SET @eventid = NEW.eventid;
	SET @propId = NEW.id;

	IF NEW.eventtype = 2 THEN
				
		INSERT INTO {dataTableName}
				(id,
				propname,
				dtype,
				intvalue,
				floatvalue,
				strvalue)
			SELECT  
				@propid,
				{dataTableName}.propname,
				{dataTableName}.dtype,
				{dataTableName}.intvalue,
				{dataTableName}.floatvalue,
				{dataTableName}.strvalue
			FROM 
				{dataTableName}
			INNER JOIN 
				{tableName} 
			ON 
				{tableName}.id = {dataTableName}.id
			WHERE 
				-- {dataTableName}.propname = 'label' 
				-- and 
				{tableName}.eventid = @eventid;
		
	END IF;

END

```

---

<div class="post-metadata">

**Author:** ![mastromtejsen](https://avatars.discourse-cdn.com/v4/letter/m/e79b87/32.png) [@mastromtejsen](https://forum.inductiveautomation.com/u/mastromtejsen)\
**Post date:** [August 28, 2019, 1:55pm UTC](https://forum.inductiveautomation.com/t/alarm-journal-table-label-field-displays-incorrectly/18929/8 "2019-08-28T13:55:31Z")

</div>

HI,

I’ve juste tried on the last version (7.9.12) and the problem is still there.  
Displaying the label on the **Alarm Journal Table** worked, but if you want to get it by scripting with the function **system.alarm.queryJournal** , all event object still show the Name instead of the Label (Ex : AlarmEvent.label or AlarmEvent.getLabel())

---

<div class="post-metadata">

**Author:** ![mazeyrat](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mazeyrat/32/10955_2.png) [@mazeyrat](https://forum.inductiveautomation.com/u/mazeyrat)\
**Post date:** [August 28, 2019, 2:30pm UTC](https://forum.inductiveautomation.com/t/alarm-journal-table-label-field-displays-incorrectly/18929/9 "2019-08-28T14:30:59Z")

</div>

You have to test with new alarms history generated agter 7.9.12 upgrade.  
The old alarms have no data associated in alarm\_event\_data.

---

<div class="post-metadata">

**Author:** ![jburt](https://avatars.discourse-cdn.com/v4/letter/j/7bcc69/32.png) [@jburt](https://forum.inductiveautomation.com/u/jburt)\
**Post date:** [November 12, 2019, 11:05pm UTC](https://forum.inductiveautomation.com/t/alarm-journal-table-label-field-displays-incorrectly/18929/10 "2019-11-12T23:05:59Z")

</div>

This issue still seems to persist with 8.0.4 as well. Setting a static text, or setting an expression containing the static text will still return the ‘name’ when using system.alarm.queryJournal.

---

<div class="post-metadata">

**Author:** ![jburt](https://avatars.discourse-cdn.com/v4/letter/j/7bcc69/32.png) [@jburt](https://forum.inductiveautomation.com/u/jburt)\
**Post date:** [November 13, 2019, 6:26pm UTC](https://forum.inductiveautomation.com/t/alarm-journal-table-label-field-displays-incorrectly/18929/11 "2019-11-13T18:26:38Z")

</div>

I’ve tried to make all the labels ‘dynamic’ with static text, but they will still not store the values. Expression like “Test alarm label 1”. Is this what you are saying, or something else?

---

<div class="post-metadata">

**Author:** ![jbolognini](https://avatars.discourse-cdn.com/v4/letter/j/ce73a5/32.png) [@jbolognini](https://forum.inductiveautomation.com/u/jbolognini)\
**Post date:** [May 4, 2022, 7:47pm UTC](https://forum.inductiveautomation.com/t/alarm-journal-table-label-field-displays-incorrectly/18929/12 "2022-05-04T19:47:07Z")

</div>

To follow up, this issue is persisting into 8.1.7 for calls to **system.alarm.queryJournal**.  
**AlarmEvent.getLabel()** returns the name not the label for all results.  
The labels display correctly in the Alarm Journal display object just not the queryJournal results.  
I am using queryJournal to export the journal daily to an excel file since Edge only keeps alarm history for 7 days.  
Anyone know a workaround? I will try looking up each event’s label from the results of **system.alarm.queryStatus()** using all\_properties to see if I can get to the label that way.

I am running Edge Compute Version: **8.1.7 (b2021060314)**  
The gateway has Stored Event Data - Static Config checked (even though I have all alarm labels configured as dynamically bound).

---

<div class="post-metadata">

**Author:** ![jbolognini](https://avatars.discourse-cdn.com/v4/letter/j/ce73a5/32.png) [@jbolognini](https://forum.inductiveautomation.com/u/jbolognini)\
**Post date:** [May 4, 2022, 9:14pm UTC](https://forum.inductiveautomation.com/t/alarm-journal-table-label-field-displays-incorrectly/18929/13 "2022-05-04T21:14:43Z")

</div>

OK spent some time with queryJournal trying to retrieve dynamic labels.  
If I specify includeData=True, then I am getting the correct labels for most entries. The exception is “Cleared, Acknowledge” entries are still showing the alarm name for the label.

@paul-griffith any idea what is going on?

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [May 6, 2022, 7:06pm UTC](https://forum.inductiveautomation.com/t/alarm-journal-table-label-field-displays-incorrectly/18929/14 "2022-05-06T19:06:32Z")

</div>

I don’t, I haven’t touched the alarming system in a while. I’d recommend contacting support.
