# Table bounds checking

**URL:** <https://forum.inductiveautomation.com/t/table-bounds-checking/4075>\
**Category:** Ignition\
**Created:** [February 28, 2012, 12:33am UTC](https://forum.inductiveautomation.com/t/table-bounds-checking/4075 "2012-02-28T00:33:51Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![weertske](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/weertske/32/3353_2.png) [@weertske](https://forum.inductiveautomation.com/u/weertske)\
**Post date:** [February 28, 2012, 12:33am UTC](https://forum.inductiveautomation.com/t/table-bounds-checking/4075/1 "2012-02-28T00:33:51Z")

</div>

The “numeric text field” has a handy bounds checking feature built into it. Is there an easy way to do this with editable table data?

---

<div class="post-metadata">

**Author:** ![Travis.Cox](https://avatars.discourse-cdn.com/v4/letter/t/b9bd4f/32.png) [@Travis.Cox](https://forum.inductiveautomation.com/u/Travis.Cox)\
**Post date:** [February 28, 2012, 4:04pm UTC](https://forum.inductiveautomation.com/t/table-bounds-checking/4075/2 "2012-02-28T16:04:24Z")

</div>

No, but you can do it in the cellEdited script. Something like:[code]value = event.newValue  
row = event.row  
column = event.column

if column == 1 and (value \< 0 or value \> 100):  
system.gui.messageBox(“Please enter in a correct number”)  
system.db.refresh(event.source, “data”)  
else:  
# your normal code[/code]

---

<div class="post-metadata">

**Author:** ![weertske](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/weertske/32/3353_2.png) [@weertske](https://forum.inductiveautomation.com/u/weertske)\
**Post date:** [February 28, 2012, 4:22pm UTC](https://forum.inductiveautomation.com/t/table-bounds-checking/4075/3 "2012-02-28T16:22:35Z")

</div>

If I add some columns to the “Column Attributes Data” named minimum and maximum is there a way to read the data out of those columns for comparison testing?

I am trying to automate this as much as possible as I will be building a number of large tables.

---

<div class="post-metadata">

**Author:** ![weertske](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/weertske/32/3353_2.png) [@weertske](https://forum.inductiveautomation.com/u/weertske)\
**Post date:** [February 29, 2012, 12:41am UTC](https://forum.inductiveautomation.com/t/table-bounds-checking/4075/4 "2012-02-29T00:41:14Z")

</div>

I added two new columns to “Column Attributes Data” called minimum and maximum (both float data type). I then created a script to look up the correct minimum and maximum for the value being edited. For entries that are string type (varchar), I tell the script to skip the comparison logic and accept the value.

Is there any problem storing the minimum and maximum values in “Column Attributes Data”?

---

<div class="post-metadata">

**Author:** ![Travis.Cox](https://avatars.discourse-cdn.com/v4/letter/t/b9bd4f/32.png) [@Travis.Cox](https://forum.inductiveautomation.com/u/Travis.Cox)\
**Post date:** [February 29, 2012, 2:03am UTC](https://forum.inductiveautomation.com/t/table-bounds-checking/4075/5 "2012-02-29T02:03:16Z")

</div>

No, you can add columns. However, it just means you can’t use the table customizer any more. The table customizer will overwrite the entire dataset.
