# Passing transaction group SQL error to screen

**URL:** <https://forum.inductiveautomation.com/t/passing-transaction-group-sql-error-to-screen/54030>\
**Category:** Ignition\
**Created:** [December 13, 2021, 4:22am UTC](https://forum.inductiveautomation.com/t/passing-transaction-group-sql-error-to-screen/54030 "2021-12-13T04:22:32Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![benw](https://avatars.discourse-cdn.com/v4/letter/b/8edcca/32.png) [@benw](https://forum.inductiveautomation.com/u/benw)\
**Post date:** [December 13, 2021, 4:22am UTC](https://forum.inductiveautomation.com/t/passing-transaction-group-sql-error-to-screen/54030/1 "2021-12-13T04:22:32Z")

</div>

Hi All,

Just wondering if there's any way to grab and pass the error from a transaction group into a tag for the purpose of displaying on the screen?

Example below of what I'm referring to:  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/7/2/72545455aeeb8574e5dd9348e0d995c9c13b17fb.png)

SQL to throwing back the invalid fill ID fault and I want to pass that out onto an Ignition display if possible.

Appreciate any insight.

Thanks

Edit:- Same issue raised below but didn't seem to get much of a response:

> [@Get error message from SP SQL Server. display message with error type](https://forum.inductiveautomation.com/t/get-error-message-from-sp-sql-server-display-message-with-error-type/22662):
>
> I Need to get the error message from and SP or a Transaction and use it with Ignition. for example. if we have a duplicate fail insert, i want to catch that error , identify it, and then display an error message box saying ’ Can’t insert a duplicate name’. if the error was for example something different, then do the same and display a different message like for example: ‘Can’t insert the a negative value into Cases amount’. a way to do this would be to pass the Message Error into an Out param…

---

<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:** [December 13, 2021, 4:27am UTC](https://forum.inductiveautomation.com/t/passing-transaction-group-sql-error-to-screen/54030/2 "2021-12-13T04:27:01Z")

</div>

If you can have such execution problems, I would re-implement the transaction group as a gateway tag change script. Within a script, you can capture then do whatever you like with exceptions.

Edit: See "case 3" in this topic for ideas:

> [@Missed gateway tag change events/split separated strings into individual tags](https://forum.inductiveautomation.com/t/missed-gateway-tag-change-events-split-separated-strings-into-individual-tags/42705/7):
>
> Ok. I use multiple techniques depending on the client’s needs and trust in hardware at various points along the chain. In all cases, I avoid triggering on booleans, and I avoid writing any given value from more than one direction. I like to use small integers as triggers–increment to trigger, rolling over naturally, but skipping zero. Sometimes an LINT timestamp is a natural trigger (Logix UTC wallclock µs or Omron clock ns, perhaps). Case 1: Fire and Forget Sometimes one just wants produc…

---

<div class="post-metadata">

**Author:** ![benw](https://avatars.discourse-cdn.com/v4/letter/b/8edcca/32.png) [@benw](https://forum.inductiveautomation.com/u/benw)\
**Post date:** [December 17, 2021, 1:34am UTC](https://forum.inductiveautomation.com/t/passing-transaction-group-sql-error-to-screen/54030/3 "2021-12-17T01:34:59Z")

</div>

Is this still relevant if it’s a stored procedure transaction? I’ll go down this path if it is.

Thanks

---

<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:** [December 17, 2021, 2:14am UTC](https://forum.inductiveautomation.com/t/passing-transaction-group-sql-error-to-screen/54030/4 "2021-12-17T02:14:25Z")

</div>

Yes. Scripts can run DB stored procedures.
