# Block Transaction Group

**URL:** <https://forum.inductiveautomation.com/t/block-transaction-group/95070>\
**Category:** Ignition\
**Created:** [August 23, 2024, 10:46am UTC](https://forum.inductiveautomation.com/t/block-transaction-group/95070 "2024-08-23T10:46:20Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Valerio\_Mantini](https://avatars.discourse-cdn.com/v4/letter/v/a8b319/32.png) [@Valerio\_Mantini](https://forum.inductiveautomation.com/u/Valerio_Mantini)\
**Post date:** [August 23, 2024, 10:46am UTC](https://forum.inductiveautomation.com/t/block-transaction-group/95070/1 "2024-08-23T10:46:20Z")

</div>

Hello community,  
I'm struggling with Block Transaction Group and I need help!

I've created a Block Transaction group with 3 variables, storing into the DB table also the row id, in order to have something similar to key-value database.

This is the transaction group

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/2/2/2250596fac7ec672e3ba42b98b36f69af31985f8.png)

And this is the resulting table created with 3 rows each second, with row\_id 0, 1 and 2:

![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/d/7/d7f2cd8e4814a08669b0611a0cd404b0ece1f846.png)

Now, if I delete the variable in the middle of transaction group (row\_id = 1)

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/8/f/8fa1d88f565059f1729cedb84c931295d1055730.png)

The transaction group associates the previous row\_id = 1 to a different variable:

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

As you can see, before the row\_id = 1 was associated to the Integer datatype  
number, now is associated to the double datatype number.

The problem now is that if I query the table with the row\_index = 1 I obtain the wrong result.

Is it possible in some way to keep the row\_id always to the same variable??

Thanks everybody for the support.

Regards

---

<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 23, 2024, 12:10pm UTC](https://forum.inductiveautomation.com/t/block-transaction-group/95070/2 "2024-08-23T12:10:44Z")

</div>

> [@Valerio\_Mantini](#):
>
> Is it possible in some way to keep the row\_id always to the same variable??

No.

Consider adding your own unique value ID to store with each row.

---

<div class="post-metadata">

**Author:** ![Valerio\_Mantini](https://avatars.discourse-cdn.com/v4/letter/v/a8b319/32.png) [@Valerio\_Mantini](https://forum.inductiveautomation.com/u/Valerio_Mantini)\
**Post date:** [August 23, 2024, 12:22pm UTC](https://forum.inductiveautomation.com/t/block-transaction-group/95070/3 "2024-08-23T12:22:54Z")

</div>

Hi @pturmel, Thanks for your answer. How can I add my value ID to each variable?

---

<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 23, 2024, 12:33pm UTC](https://forum.inductiveautomation.com/t/block-transaction-group/95070/4 "2024-08-23T12:33:25Z")

</div>

Add another block item with three constant values and a different target column name.

---

<div class="post-metadata">

**Author:** ![Valerio\_Mantini](https://avatars.discourse-cdn.com/v4/letter/v/a8b319/32.png) [@Valerio\_Mantini](https://forum.inductiveautomation.com/u/Valerio_Mantini)\
**Post date:** [August 27, 2024, 9:10am UTC](https://forum.inductiveautomation.com/t/block-transaction-group/95070/5 "2024-08-27T09:10:19Z")

</div>

Hi @pturmel, is there a faster solution since I will have up to 5000 variables?

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:** [August 27, 2024, 11:28am UTC](https://forum.inductiveautomation.com/t/block-transaction-group/95070/6 "2024-08-27T11:28:57Z")

</div>

You should be scripting your data storage, then. Not using a transaction group. Transaction groups purpose in life is to allow drag-n-drop configuration for those who do not wish to write scripts.
