# Transaction Groups - Store Procedure Group - Boolean output returns Ascii Integer

**URL:** <https://forum.inductiveautomation.com/t/transaction-groups-store-procedure-group-boolean-output-returns-ascii-integer/97795>\
**Category:** Ignition\
**Tags:** ignition81, troubleshooting\
**Created:** [October 25, 2024, 7:38pm UTC](https://forum.inductiveautomation.com/t/transaction-groups-store-procedure-group-boolean-output-returns-ascii-integer/97795 "2024-10-25T19:38:52Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Leopoldo\_Enrique\_Olv](https://avatars.discourse-cdn.com/v4/letter/l/5daacb/32.png) [@Leopoldo\_Enrique\_Olv](https://forum.inductiveautomation.com/u/Leopoldo_Enrique_Olv)\
**Post date:** [October 25, 2024, 7:38pm UTC](https://forum.inductiveautomation.com/t/transaction-groups-store-procedure-group-boolean-output-returns-ascii-integer/97795/1 "2024-10-25T19:38:52Z")

</div>

I have a Transaction Group, type Store Procedure Group.  
My SQL procedure returns a boolean Error Status ( 0 = ok , 1 = error) and a text error message (some text describing the type of error if any)

Group works well, except that it always showed me "true" for the error status boolean.

Then I tried changing to Integer the type of the data I'm reading, and change also to Integer to the tag I'm writing to. And I am receiving a "48", which in Ascii code is a "0"

If I force bad data to receive an error back, I get a "49", which in Ascii code is "1"

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/6/c/6c37d07bc40777aaef265a03f6c9270d16513fa2.png)

I can do my "error checking" for a 49 with no issue,  
but has someone seen this same thing?  
is there a way around this?

---

<div class="post-metadata">

**Author:** ![JordanCClark](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/jordancclark/32/83362_2.png) [@JordanCClark](https://forum.inductiveautomation.com/u/JordanCClark)\
**Post date:** [October 26, 2024, 12:26am UTC](https://forum.inductiveautomation.com/t/transaction-groups-store-procedure-group-boolean-output-returns-ascii-integer/97795/2 "2024-10-26T00:26:08Z")

</div>

Ideally, you would change the stored procedure to return the correct datatype.

Otherwise, make an expression item in the group, returning a boolean

Does it show a 0 or 1 when the groups item is set to String?  
If so:

```python
toBoolean({SP_Modules/SP_Module_3/Error_Status})

```

Otherwise, applying a bit of logic in the expression would work:

```python
if({SP_Modules/SP_Module_3/Error_Status} = 49
   true,
   false
  )
```

---

<div class="post-metadata">

**Author:** ![Leopoldo\_Enrique\_Olv](https://avatars.discourse-cdn.com/v4/letter/l/5daacb/32.png) [@Leopoldo\_Enrique\_Olv](https://forum.inductiveautomation.com/u/Leopoldo_Enrique_Olv)\
**Post date:** [November 5, 2024, 3:21pm UTC](https://forum.inductiveautomation.com/t/transaction-groups-store-procedure-group-boolean-output-returns-ascii-integer/97795/3 "2024-11-05T15:21:29Z")

</div>

Thank you @JordanCClark  
No, if set to string I still get 48 and 49.

Im connecting to a MariaDB with a MySQL translator, the field at the MariaDB is in fact a boolean.  
Maybe there is an issue with the translation between DBs?  
Weird thing is i can get a "1" or "0" if I query the DB from a NamedQuery, and I can use it as booleans without issue....

Anyhow, for my process, a Transaction Group works better, so using your proposed logic in the expression worked OK. allowing to be transparent outside of the Transaction Group to use a boolean for error flags.
