# Strange expression binding error

**URL:** <https://forum.inductiveautomation.com/t/strange-expression-binding-error/2353>\
**Category:** Ignition\
**Created:** [November 17, 2010, 11:49pm UTC](https://forum.inductiveautomation.com/t/strange-expression-binding-error/2353 "2010-11-17T23:49:50Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![PenCapBlue](https://avatars.discourse-cdn.com/v4/letter/p/e9bcb4/32.png) [@PenCapBlue](https://forum.inductiveautomation.com/u/PenCapBlue)\
**Post date:** [November 17, 2010, 11:49pm UTC](https://forum.inductiveautomation.com/t/strange-expression-binding-error/2353/1 "2010-11-17T23:49:50Z")

</div>

I am using a Row selector output as the data input to a table. I am then using a property with the expression:

{Root Container.Table.data}[0, “batch\_num”]

The purpose of this is to retrieve a single relevant cell from the database for use as an input in another row selector. While the property reads the correct value I am continually receiving an error:

Exception: Error executing expression binding on  
Main Window.Root Container.Numeric Label.value  
caused by IndexOutOfBoundsException: Index: 0, Size: 0

Ignition v7.1.7 (b6048)  
Java: Sun Microsystems Inc. 1.6.0\_22

Is there a method of catching an error? How would I go about fixing this problem?

---

<div class="post-metadata">

**Author:** ![PenCapBlue](https://avatars.discourse-cdn.com/v4/letter/p/e9bcb4/32.png) [@PenCapBlue](https://forum.inductiveautomation.com/u/PenCapBlue)\
**Post date:** [November 18, 2010, 12:25am UTC](https://forum.inductiveautomation.com/t/strange-expression-binding-error/2353/2 "2010-11-18T00:25:15Z")

</div>

Problem solved:

[code]if({Root Container.Table.selectedRow} = -1,

```
"", // this is the fail case

{Root Container.Table.data}[{Root Container.Table.selectedRow}, "BATCH_NUM"])[/code]
```

---

<div class="post-metadata">

**Author:** ![Carl.Gould](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/carl.gould/32/7262_2.png) [@Carl.Gould](https://forum.inductiveautomation.com/u/Carl.Gould)\
**Post date:** [November 18, 2010, 4:43pm UTC](https://forum.inductiveautomation.com/t/strange-expression-binding-error/2353/3 "2010-11-18T16:43:31Z")

</div>

Indeed, this is such a common pattern that the solution is [in the user manual](http://www.inductiveautomation.com/support/usermanuals/ignition/index.html?tables_pmitable.htm).
