# Lookup expression Error

**URL:** <https://forum.inductiveautomation.com/t/lookup-expression-error/10481>\
**Category:** Ignition\
**Created:** [September 17, 2015, 5:39pm UTC](https://forum.inductiveautomation.com/t/lookup-expression-error/10481 "2015-09-17T17:39:34Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![jreynolds](https://avatars.discourse-cdn.com/v4/letter/j/58956e/32.png) [@jreynolds](https://forum.inductiveautomation.com/u/jreynolds)\
**Post date:** [September 17, 2015, 5:39pm UTC](https://forum.inductiveautomation.com/t/lookup-expression-error/10481/1 "2015-09-17T17:39:34Z")

</div>

I’m trying to pull a value from a dataset using the lookup expression, but all I get is the failover value.

```auto
lookup({Root Container.bsktData},"BSKTLOC_01",0,2)
```

I’m wanting to grab the bskt\_id based on the BSKTLOC\_##

 ![](https://us1.discourse-cdn.com/inductiveautomation/original/2X/b/bb31deae078296d540475a52e03dbde880b98d52.PNG)

---

<div class="post-metadata">

**Author:** ![nmudge](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nmudge/32/3394_2.png) [@nmudge](https://forum.inductiveautomation.com/u/nmudge)\
**Post date:** [September 17, 2015, 6:10pm UTC](https://forum.inductiveautomation.com/t/lookup-expression-error/10481/2 "2015-09-17T18:10:27Z")

</div>

Try specifying the lookup column and the result column. This should work:

`
lookup({Root Container.bsktData},"BSKTLOC_01",0,1,2)
`Best,

---

<div class="post-metadata">

**Author:** ![jreynolds](https://avatars.discourse-cdn.com/v4/letter/j/58956e/32.png) [@jreynolds](https://forum.inductiveautomation.com/u/jreynolds)\
**Post date:** [September 17, 2015, 7:10pm UTC](https://forum.inductiveautomation.com/t/lookup-expression-error/10481/3 "2015-09-17T19:10:13Z")

</div>

Thanks nmudge!

Do you know how to refresh the dataset? It’s a custom property on the root container and I can’t find anything that will let me refresh upon a button click.

---

<div class="post-metadata">

**Author:** ![nmudge](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nmudge/32/3394_2.png) [@nmudge](https://forum.inductiveautomation.com/u/nmudge)\
**Post date:** [September 17, 2015, 7:54pm UTC](https://forum.inductiveautomation.com/t/lookup-expression-error/10481/4 "2015-09-17T19:54:03Z")

</div>

Check out system.db.refresh: [support.inductiveautomation.com … efresh.htm](https://support.inductiveautomation.com/usermanuals/ignition/index.html?system_db_refresh.htm)

It works with more than database queries.

---

<div class="post-metadata">

**Author:** ![jreynolds](https://avatars.discourse-cdn.com/v4/letter/j/58956e/32.png) [@jreynolds](https://forum.inductiveautomation.com/u/jreynolds)\
**Post date:** [September 17, 2015, 7:56pm UTC](https://forum.inductiveautomation.com/t/lookup-expression-error/10481/5 "2015-09-17T19:56:59Z")

</div>

I tried that and this is the error I got

[code]Traceback (most recent call last):

File “event:actionPerformed”, line 2, in

TypeError: refresh(): 1st arg can’t be coerced to javax.swing.JComponent

Ignition v7.7.4 (b2015033012)  
Java: Oracle Corporation 1.8.0\_51  
[/code]

---

<div class="post-metadata">

**Author:** ![jreynolds](https://avatars.discourse-cdn.com/v4/letter/j/58956e/32.png) [@jreynolds](https://forum.inductiveautomation.com/u/jreynolds)\
**Post date:** [September 17, 2015, 7:57pm UTC](https://forum.inductiveautomation.com/t/lookup-expression-error/10481/6 "2015-09-17T19:57:51Z")

</div>

This is the code on the button

`table = event.source.parent.bsktData
system.db.refresh(table, "data")`

---

<div class="post-metadata">

**Author:** ![JGJohnson](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/jgjohnson/32/29582_2.png) [@JGJohnson](https://forum.inductiveautomation.com/u/JGJohnson)\
**Post date:** [September 17, 2015, 8:00pm UTC](https://forum.inductiveautomation.com/t/lookup-expression-error/10481/7 "2015-09-17T20:00:58Z")

</div>

Try system.db.refresh(event.source.parent, “bsktData”)

Assuming event.source.parent is the root container and bsktData is the dataset bound variable.

---

<div class="post-metadata">

**Author:** ![drewdin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/drewdin/32/3363_2.png) [@drewdin](https://forum.inductiveautomation.com/u/drewdin)\
**Post date:** [January 12, 2016, 9:07pm UTC](https://forum.inductiveautomation.com/t/lookup-expression-error/10481/8 "2016-01-12T21:07:31Z")

</div>

[quote=“JGJohnson”]Try system.db.refresh(event.source.parent, “bsktData”)

Assuming event.source.parent is the root container and bsktData is the dataset bound variable.[/quote]

This helped me, thanks!

---

<div class="post-metadata">

**Author:** ![paulm1](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paulm1/32/5900_2.png) [@paulm1](https://forum.inductiveautomation.com/u/paulm1)\
**Post date:** [March 19, 2019, 10:21pm UTC](https://forum.inductiveautomation.com/t/lookup-expression-error/10481/9 "2019-03-19T22:21:57Z")

</div>

Thanks JFJohnson.

Used your advice on a Standard Table Component - internalFrameActivated Script

```
system.db.refresh(event.source.parent, "Root Container.Table.data")
```
