No Displaypath with system.alarm.queryJournal?

I am trying to view the alarm journal and limit its results to just the most 5 recent entries. I didn’t see an option for that on the official alarm journal object so I wrote a script that would query the alarm journal and then trim the list down to five entries.

It worked, but my display path is empty, for some reason, the provider, tag path and alarm name have all been shoved into “Source” like this

prov:default:/tag:Bays/Bay_1/Chiller Status:/alm:Chiller Faulted

I checked the database and sure enough, DisplayPath is empty and everything is thrown together in the Source column. Does anyone know why on earth that would be? It seems like it would just make performing selects more difficult as you now have to parse strings to get information that should be stored in a unique column :scratch: (Using Ignition 7.9.1)

If the display path is not configured, or is static, then it will not be stored in each record of the journal tables. However, in recent versions of Ignition, the display path can be retrieved from one of the AlarmEvent objects in the returned lists using the member method: getDisplayPathOrSource()

The alarm name is retrieved using: getName()

getSource() will return a fully-qualified path, which can be parsed using the built-in methods of that object:

To get the tag path:

To get the provider:

IA really needs to add the tagpath into the “displaypath” field of the journal table(if somthing isnt manually put there). There is already a field for it in the Journal table and could be interpreted in the manual in 7.9-8.1 to indicate that it would exist there. How is shows op on the alarm status and historys pages and not in the table is just odd and clunky.

The Source field always contains the full tag path with alarm context, but it’s in the different format.
The DisplayPath by default contains the “normal” full tag path without alarm context, but can be overridden.

I agree that maybe there should be another field that is always set to the “normal” full tag path i.e. [provider]path/to/alarm/tag or maybe even with alarm context [provider]path/to/alarm/tag/Alarms/Failed to Stop

Actually the default entry in the Alarm Journal for the “display path” is null, but somehow it shows up in the alarm status and alarm history screen one of which theoreticly comes from the “alarm journal” (minus the display path field)