# Alarm Journal Sort By Event Time DESC

**URL:** <https://forum.inductiveautomation.com/t/alarm-journal-sort-by-event-time-desc/15278>\
**Category:** Ignition\
**Tags:** scripting, ignition79\
**Created:** [September 8, 2017, 12:05am UTC](https://forum.inductiveautomation.com/t/alarm-journal-sort-by-event-time-desc/15278 "2017-09-08T00:05:45Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![MMaynard](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mmaynard/32/3366_2.png) [@MMaynard](https://forum.inductiveautomation.com/u/MMaynard)\
**Post date:** [September 8, 2017, 12:05am UTC](https://forum.inductiveautomation.com/t/alarm-journal-sort-by-event-time-desc/15278/1 "2017-09-08T00:05:45Z")

</div>

To anyone who can tell me how I can have the Alarm Journal Component sort DESC on Event Time by default,  
I will buy you multiple beers at ICC next week 🙂

---

<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:** [September 8, 2017, 8:05am UTC](https://forum.inductiveautomation.com/t/alarm-journal-sort-by-event-time-desc/15278/2 "2017-09-08T08:05:56Z")

</div>

You could perhaps need to use :

> [@Graphical Object Inspector in Ignition](http://forum.inductiveautomation.com/t/graphical-object-inspector-in-ignition/12239):
>
> Perfect Abstractions recently released a free tool to graphically inspect the contents (classes and methods) of components in Ignition. You can find out more about it and download it from the blog post at this link: [nickmudge.info/post/graphical-ob … n-ignition](http://nickmudge.info/post/graphical-object-inspector-in-ignition) Here is a screenshot:

do dive into the underlying table component.

---

<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:** [September 8, 2017, 3:03pm UTC](https://forum.inductiveautomation.com/t/alarm-journal-sort-by-event-time-desc/15278/3 "2017-09-08T15:03:08Z")

</div>

```auto
table = event.source.parent.getComponent("Alarm Journal").getComponent(0).getComponent(0).getComponent(1).getComponent(0).getComponent(0).getComponent(0)

table.sortColumn(
	0 #column index
	, True #reset other sorts applied to table
	, False #ascending?
	)

```

Not guaranteed to work between different Ignition versions, and it doesn’t graphically update (no descending icon on the table itself).

---

<div class="post-metadata">

**Author:** ![MMaynard](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mmaynard/32/3366_2.png) [@MMaynard](https://forum.inductiveautomation.com/u/MMaynard)\
**Post date:** [September 8, 2017, 3:55pm UTC](https://forum.inductiveautomation.com/t/alarm-journal-sort-by-event-time-desc/15278/4 "2017-09-08T15:55:37Z")

</div>

Paul,  
That worked great except eventtime is actually column 4  
I owe you some beers!

---

<div class="post-metadata">

**Author:** ![nathan.willbanks](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nathan.willbanks/32/8489_2.png) [@nathan.willbanks](https://forum.inductiveautomation.com/u/nathan.willbanks)\
**Post date:** [April 26, 2019, 2:31pm UTC](https://forum.inductiveautomation.com/t/alarm-journal-sort-by-event-time-desc/15278/5 "2019-04-26T14:31:33Z")

</div>

I’m trying to use this script on version 7.9.6 & not having any luck.

I wasn’t sure exactly where you intended for this script to be added, but when I try to add it as an “internalFramActivated” on the window containing the alarm journal, I get the error:  
“getComponent(): 1st arg can’t be coerced to int”

Any help is appreciated.

---

<div class="post-metadata">

**Author:** ![MMaynard](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mmaynard/32/3366_2.png) [@MMaynard](https://forum.inductiveautomation.com/u/MMaynard)\
**Post date:** [April 26, 2019, 5:49pm UTC](https://forum.inductiveautomation.com/t/alarm-journal-sort-by-event-time-desc/15278/6 "2019-04-26T17:49:21Z")

</div>

Put it in the filter custom event on the alarm summary control.

---

<div class="post-metadata">

**Author:** ![zxcslo](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/zxcslo/32/61610_2.png) [@zxcslo](https://forum.inductiveautomation.com/u/zxcslo)\
**Post date:** [April 24, 2023, 11:17am UTC](https://forum.inductiveautomation.com/t/alarm-journal-sort-by-event-time-desc/15278/7 "2023-04-24T11:17:30Z")

</div>

> [@paul-griffith](#):
>
> Not guaranteed to work between different Ignition versions, and it doesn’t graphically update (no descending icon on the table itself).

This is still working in v8.1.26 and **IT DOES** graphically update: there **IS** descending icon on the table itself.
