# Alarm Journal Refresh

**URL:** <https://forum.inductiveautomation.com/t/alarm-journal-refresh/11311>\
**Category:** Ignition\
**Created:** [March 3, 2016, 10:36pm UTC](https://forum.inductiveautomation.com/t/alarm-journal-refresh/11311 "2016-03-03T22:36:47Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![WKetcham](https://avatars.discourse-cdn.com/v4/letter/w/c57346/32.png) [@WKetcham](https://forum.inductiveautomation.com/u/WKetcham)\
**Post date:** [March 3, 2016, 10:36pm UTC](https://forum.inductiveautomation.com/t/alarm-journal-refresh/11311/1 "2016-03-03T22:36:47Z")

</div>

Is there a method to force an alarm Journal Table to refresh (other than changing the start or end dates)?

I want to be able to dynamically filter the journal table on associated data. I added the filter string as a dynamic property on the journal table, but changing it’s value will not update the table. The only way I can get the table to update is to change the date range and then change it back.

---

<div class="post-metadata">

**Author:** ![DougSN](https://avatars.discourse-cdn.com/v4/letter/d/a9adbd/32.png) [@DougSN](https://forum.inductiveautomation.com/u/DougSN)\
**Post date:** [July 8, 2016, 3:25pm UTC](https://forum.inductiveautomation.com/t/alarm-journal-refresh/11311/2 "2016-07-08T15:25:02Z")

</div>

I’ve got the same question. I arbitrarily tried running the below code, but neither line works, I just get warnings that it is “unable to find a refresh-compatible property binding”

`system.db.refresh(event.source.parent.getComponent('Alarm Journal'), "data")
system.db.refresh(event.source.parent.getComponent('Alarm Journal'), "alarms")`

Anyone else have any luck refreshing the Alarm Journal Table component?

---

<div class="post-metadata">

**Author:** ![DougSN](https://avatars.discourse-cdn.com/v4/letter/d/a9adbd/32.png) [@DougSN](https://forum.inductiveautomation.com/u/DougSN)\
**Post date:** [July 8, 2016, 3:51pm UTC](https://forum.inductiveautomation.com/t/alarm-journal-refresh/11311/3 "2016-07-08T15:51:00Z")

</div>

Here is my workaround, it’s actually very smooth from the user’s perspective.

My Alarm Journal Component’s startDate and endDate properties are bound to the startDate and endDate properties of a Date Range component. To get a refresh to happen, I put a Button component on the screen which adjusts the Date Range’s startDate and then immediately changes it back. I named this my “Refresh Button.” Here is the code from my refresh button’s actionPerformed event handler.

[code]startDate = event.source.parent.getComponent(‘Date Range’).startDate

#Subtract one minute from the start time on the range so the Alarm Journal Table component refreshes its dataset.  
startDate = system.date.addMinutes(startDate, -1)  
event.source.parent.getComponent(‘Date Range’).startDate = startDate

#Add the minute back so our range is still the same.  
startDate = system.date.addMinutes(startDate, 1)  
event.source.parent.getComponent(‘Date Range’).startDate = startDate[/code]

Then, to get it to work automatically, I added a Timer component with the following code in its actionPerformed event handler.

```auto
event.source.parent.getComponent('Refresh Button').doClick()
```

After that, it’s just a matter of modifying the Timer’s delay so that the Journal refreshes at the rate you want. You can even make the refresh button invisible if you don’t want users to know it’s happening. Or leave it visible and they will have the ability to refresh at their own pace in addition to the timed refresh rate.

Now that I think about it, you could probably have the refresh button directly modify the Alarm Journal Table’s startDate instead of doing it indirectly like I did. Probably would have the same effect.

---

<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:** [July 8, 2016, 5:29pm UTC](https://forum.inductiveautomation.com/t/alarm-journal-refresh/11311/4 "2016-07-08T17:29:17Z")

</div>

We use a dropdown list to filter the alarms like you do, but in the PropertyChange event on the dropdown we do the following

```auto
event.source.parent.getComponent('Alarm Journal').startDate=event.source.parent.getComponent('Range').startDate
```

It just rewrites the start date to the same value and it triggers the refresh and filter.

---

<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:** [July 8, 2016, 7:17pm UTC](https://forum.inductiveautomation.com/t/alarm-journal-refresh/11311/5 "2016-07-08T19:17:26Z")

</div>

Doug,  
In your case you could just set the EndDate to an expression like

```auto
now(5000)
```

---

<div class="post-metadata">

**Author:** ![qliu](https://avatars.discourse-cdn.com/v4/letter/q/bc8723/32.png) [@qliu](https://forum.inductiveautomation.com/u/qliu)\
**Post date:** [January 18, 2021, 8:19pm UTC](https://forum.inductiveautomation.com/t/alarm-journal-refresh/11311/6 "2021-01-18T20:19:33Z")

</div>

Hey @MMaynard, what is the 5000 mean, is this the refresh rate for refresh every 5 seconds? Thank you!

---

<div class="post-metadata">

**Author:** ![lrose](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/lrose/32/62724_2.png) [@lrose](https://forum.inductiveautomation.com/u/lrose)\
**Post date:** [January 18, 2021, 8:23pm UTC](https://forum.inductiveautomation.com/t/alarm-journal-refresh/11311/7 "2021-01-18T20:23:54Z")

</div>

It is the polling rate in milliseconds. In this case the expression would update every 5 seconds.

---

<div class="post-metadata">

**Author:** ![qliu](https://avatars.discourse-cdn.com/v4/letter/q/bc8723/32.png) [@qliu](https://forum.inductiveautomation.com/u/qliu)\
**Post date:** [January 18, 2021, 8:36pm UTC](https://forum.inductiveautomation.com/t/alarm-journal-refresh/11311/8 "2021-01-18T20:36:59Z")

</div>

Thank you sir!
