# Event triggered data logging to database

**URL:** <https://forum.inductiveautomation.com/t/event-triggered-data-logging-to-database/20284>\
**Category:** Ignition\
**Created:** [October 20, 2018, 5:00pm UTC](https://forum.inductiveautomation.com/t/event-triggered-data-logging-to-database/20284 "2018-10-20T17:00:58Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![simon.ong](https://avatars.discourse-cdn.com/v4/letter/s/e79b87/32.png) [@simon.ong](https://forum.inductiveautomation.com/u/simon.ong)\
**Post date:** [October 20, 2018, 5:00pm UTC](https://forum.inductiveautomation.com/t/event-triggered-data-logging-to-database/20284/1 "2018-10-20T17:00:58Z")

</div>

I am new to ignition, here is what i am looking ar-

When a bit from plc tag is turn on, the system need to log a few  
Data from the plc into a database and then the on-bit has to be turn off  
.

Do i use event scripting? If yes how and also where can i find the scrting setail manual ? Or there is already a built in function  
that i can use and where and how to to this?

---

<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:** [October 20, 2018, 7:31pm UTC](https://forum.inductiveautomation.com/t/event-triggered-data-logging-to-database/20284/2 "2018-10-20T19:31:19Z")

</div>

The simplest approach would be a transaction group, triggering on that bit, using OPC Read mode to grab the rest of the data, and a handshake on success that turns the bit back off. For this to work properly, you’ll want to drag items directly from the OPC Browser to the transaction group’s item list – don’t use tags.
