# Event history

**URL:** <https://forum.inductiveautomation.com/t/event-history/1887>\
**Category:** Ignition\
**Created:** [June 2, 2010, 6:19pm UTC](https://forum.inductiveautomation.com/t/event-history/1887 "2010-06-02T18:19:57Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![Robert](https://avatars.discourse-cdn.com/v4/letter/r/e95f7d/32.png) [@Robert](https://forum.inductiveautomation.com/u/Robert)\
**Post date:** [June 2, 2010, 6:19pm UTC](https://forum.inductiveautomation.com/t/event-history/1887/1 "2010-06-02T18:19:57Z")

</div>

The ability to return a list of discrete tags and their values sorted by time of change from the tags history.

The return dataset would look something like this:

time, tagpath/name, value

Currently, if the system has several hundred discrete points, and I want to find the root cause of an event, I would have to query the historian and then look through several hundred columns to try and find which tag changed. Having one change per row in the result set is much preferred.

---

<div class="post-metadata">

**Author:** ![Carl.Gould](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/carl.gould/32/7262_2.png) [@Carl.Gould](https://forum.inductiveautomation.com/u/Carl.Gould)\
**Post date:** [June 3, 2010, 11:02pm UTC](https://forum.inductiveautomation.com/t/event-history/1887/2 "2010-06-03T23:02:44Z")

</div>

I believe you are describing system.tag.queryTagHistory with a returnSize of -1. See the [documentation here](http://www.inductiveautomation.com/support/usermanuals/ignition/index.html?system_tag_querytaghistory.htm).

---

<div class="post-metadata">

**Author:** ![Robert](https://avatars.discourse-cdn.com/v4/letter/r/e95f7d/32.png) [@Robert](https://forum.inductiveautomation.com/u/Robert)\
**Post date:** [June 5, 2010, 2:00am UTC](https://forum.inductiveautomation.com/t/event-history/1887/3 "2010-06-05T02:00:14Z")

</div>

Close. But that still returns one column per tag. My users don’t want to see a table with 100’s of columns.  
They want a table with a couple of columns (time, event, value) and hundreds or rows.

Basically they want to know in what order breakers tripped and sensors alarmed. Like reading a log file.

---

<div class="post-metadata">

**Author:** ![Colby.Clegg](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/colby.clegg/32/3282_2.png) [@Colby.Clegg](https://forum.inductiveautomation.com/u/Colby.Clegg)\
**Post date:** [June 5, 2010, 10:35pm UTC](https://forum.inductiveautomation.com/t/event-history/1887/4 "2010-06-05T22:35:23Z")

</div>

I like this idea, and should be pretty easy to implement. We’ll look into it soon.

Regards,

---

<div class="post-metadata">

**Author:** ![Robert](https://avatars.discourse-cdn.com/v4/letter/r/e95f7d/32.png) [@Robert](https://forum.inductiveautomation.com/u/Robert)\
**Post date:** [June 6, 2010, 10:03pm UTC](https://forum.inductiveautomation.com/t/event-history/1887/5 "2010-06-06T22:03:13Z")

</div>

It would save me having to write a bunch of python code to do it manually ![:thumb_left:](https://us1.discourse-cdn.com/inductiveautomation/original/1X/e26afb081ddde6df016df6ee49159cf56aaca688.gif ":thumb\_left:")

---

<div class="post-metadata">

**Author:** ![Robert](https://avatars.discourse-cdn.com/v4/letter/r/e95f7d/32.png) [@Robert](https://forum.inductiveautomation.com/u/Robert)\
**Post date:** [June 28, 2010, 4:13pm UTC](https://forum.inductiveautomation.com/t/event-history/1887/6 "2010-06-28T16:13:17Z")

</div>

Hi Colby,

Hope you had a nice vacation.

[quote=“Colby.Clegg”]I like this idea, and should be pretty easy to implement. We’ll look into it soon.  
[/quote]  
How soon is soon? 😈

---

<div class="post-metadata">

**Author:** ![Colby.Clegg](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/colby.clegg/32/3282_2.png) [@Colby.Clegg](https://forum.inductiveautomation.com/u/Colby.Clegg)\
**Post date:** [June 29, 2010, 5:42pm UTC](https://forum.inductiveautomation.com/t/event-history/1887/7 "2010-06-29T17:42:12Z")

</div>

Haha, thanks for reminding me. I’ll take a look today at how difficult it would be - if it’s not difficult, it’ll be done today. Otherwise, likely around 2 weeks. I’ll post back today about the status though.

Regards,

---

<div class="post-metadata">

**Author:** ![Colby.Clegg](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/colby.clegg/32/3282_2.png) [@Colby.Clegg](https://forum.inductiveautomation.com/u/Colby.Clegg)\
**Post date:** [June 29, 2010, 10:37pm UTC](https://forum.inductiveautomation.com/t/event-history/1887/8 "2010-06-29T22:37:35Z")

</div>

Ok, it’s done. Basically we’ve added a new “return format” mode- either “wide” (traditional) or “tall”, as described here- to both the binding window and the query function.

The tall return mode works along with any of the other query modes. In your case, for events, you’ll want to use the “-1” return size for “on change” data.

I _believe_ it will be included in 7.1.3- but that depends on how much testing we can do on it.

Regards,

---

<div class="post-metadata">

**Author:** ![Robert](https://avatars.discourse-cdn.com/v4/letter/r/e95f7d/32.png) [@Robert](https://forum.inductiveautomation.com/u/Robert)\
**Post date:** [June 30, 2010, 2:33pm UTC](https://forum.inductiveautomation.com/t/event-history/1887/9 "2010-06-30T14:33:25Z")

</div>

Thanks Colby

---

<div class="post-metadata">

**Author:** ![Robert](https://avatars.discourse-cdn.com/v4/letter/r/e95f7d/32.png) [@Robert](https://forum.inductiveautomation.com/u/Robert)\
**Post date:** [July 5, 2010, 7:04pm UTC](https://forum.inductiveautomation.com/t/event-history/1887/10 "2010-07-05T19:04:26Z")

</div>

How can I tell it which db to use if the history is not in the default db?

---

<div class="post-metadata">

**Author:** ![Colby.Clegg](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/colby.clegg/32/3282_2.png) [@Colby.Clegg](https://forum.inductiveautomation.com/u/Colby.Clegg)\
**Post date:** [July 5, 2010, 9:18pm UTC](https://forum.inductiveautomation.com/t/event-history/1887/11 "2010-07-05T21:18:19Z")

</div>

You should be able to use tag paths along the line of “[database]path\to\tag”. Where the value inside of “[]” means “tag provider” for realtime tags, in a historical setting it means “historical provider”, which is currently one-to-one with the database.

Regards,

---

<div class="post-metadata">

**Author:** ![Robert](https://avatars.discourse-cdn.com/v4/letter/r/e95f7d/32.png) [@Robert](https://forum.inductiveautomation.com/u/Robert)\
**Post date:** [July 14, 2010, 4:10am UTC](https://forum.inductiveautomation.com/t/event-history/1887/12 "2010-07-14T04:10:41Z")

</div>

Sorry for not getting back sooner. That did it.
