I’m trying to pull a value from a dataset using the lookup expression, but all I get is the failover value.
lookup({Root Container.bsktData},"BSKTLOC_01",0,2)
I’m wanting to grab the bskt_id based on the BSKTLOC_##
I’m trying to pull a value from a dataset using the lookup expression, but all I get is the failover value.
lookup({Root Container.bsktData},"BSKTLOC_01",0,2)
I’m wanting to grab the bskt_id based on the BSKTLOC_##
Try specifying the lookup column and the result column. This should work:
lookup({Root Container.bsktData},"BSKTLOC_01",0,1,2)
Best,
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.
Check out system.db.refresh: support.inductiveautomation.com … efresh.htm
It works with more than database queries.
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]
This is the code on the button
table = event.source.parent.bsktData
system.db.refresh(table, "data")
Try system.db.refresh(event.source.parent, “bsktData”)
Assuming event.source.parent is the root container and bsktData is the dataset bound variable.
[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!
Thanks JFJohnson.
Used your advice on a Standard Table Component - internalFrameActivated Script
system.db.refresh(event.source.parent, "Root Container.Table.data")