# Tranforming boolean history tags to events

**URL:** <https://forum.inductiveautomation.com/t/tranforming-boolean-history-tags-to-events/110143>\
**Category:** Ignition\
**Created:** [August 25, 2025, 10:38am UTC](https://forum.inductiveautomation.com/t/tranforming-boolean-history-tags-to-events/110143 "2025-08-25T10:38:16Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![ola.branas](https://avatars.discourse-cdn.com/v4/letter/o/e0b2c6/32.png) [@ola.branas](https://forum.inductiveautomation.com/u/ola.branas)\
**Post date:** [August 25, 2025, 10:38am UTC](https://forum.inductiveautomation.com/t/tranforming-boolean-history-tags-to-events/110143/1 "2025-08-25T10:38:16Z")

</div>

Hi,

I’m using Ignition to log valves opening and closing (boolean) and need to find a way to build a dataset with tagname, timestampopen, timestampclose. How can I transform data from history logging into such format? The goal is to use this in a ribbon (state) chart

O

---

<div class="post-metadata">

**Author:** ![Transistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/transistor/32/3380_2.png) [@Transistor](https://forum.inductiveautomation.com/u/Transistor)\
**Post date:** [August 25, 2025, 10:55am UTC](https://forum.inductiveautomation.com/t/tranforming-boolean-history-tags-to-events/110143/2 "2025-08-25T10:55:14Z")

</div>

The easiest way is to use a tag history binding for each valve. Set the query mode to "As Stored". The result will give you a t\_stamp and True / False for each row.

Which component are you using for the ribbon?

---

<div class="post-metadata">

**Author:** ![ola.branas](https://avatars.discourse-cdn.com/v4/letter/o/e0b2c6/32.png) [@ola.branas](https://forum.inductiveautomation.com/u/ola.branas)\
**Post date:** [August 25, 2025, 12:25pm UTC](https://forum.inductiveautomation.com/t/tranforming-boolean-history-tags-to-events/110143/3 "2025-08-25T12:25:03Z")

</div>

> [@Transistor](#):
>
> Which component are you using for the ribbon

Thank you for your response.

The only ribbon char I’ve found is this: [Ignition Exchange | Inductive Automation](https://inductiveautomation.com/exchange/1514/overview)

This require columns Tag, TSOpen, TSClose. So I need to modify the result returned from history.

O

---

<div class="post-metadata">

**Author:** ![Bushmatic](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bushmatic/32/87014_2.png) [@Bushmatic](https://forum.inductiveautomation.com/u/Bushmatic)\
**Post date:** [August 25, 2025, 1:17pm UTC](https://forum.inductiveautomation.com/t/tranforming-boolean-history-tags-to-events/110143/4 "2025-08-25T13:17:26Z")

</div>

You can use a script transform where your historical data is coming in to get the columns the way you need them, define new headers, that kind of thing. I’ve used these built-in dataset functions to do exactly this in the past.

[https://www.docs.inductiveautomation.com/docs/8.1/appendix/scripting-functions/system-dataset](https://www.docs.inductiveautomation.com/docs/8.1/appendix/scripting-functions/system-dataset)

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [August 25, 2025, 1:47pm UTC](https://forum.inductiveautomation.com/t/tranforming-boolean-history-tags-to-events/110143/5 "2025-08-25T13:47:19Z")

</div>

When using "As Stored" mode to retrieve events, it is **crucial** to use "Tall" result format instead of "Wide", as the latter duplicates timestamps across columns, giving the appearance of extra event timestamps. (My Integration Toolkit's `groupBy()` function is handy for splitting such results by tag.)
