It is currently Sun Apr 20, 2014 8:52 pm




Post new topic This topic is locked, you cannot edit posts or make further replies.  [ 5 posts ] 
 Dataset lookup 
Author Message
Captain
Captain

Joined: Fri Jun 25, 2010 5:19 am
Posts: 76
Location: Jacarei, Brasil
Post Dataset lookup
I've got a dynamic property dataset. It has multiple columns and I need to query against this using the Lookup expression. Problem is, the criteria involves values from 2 of the columns, anyway to do this easily?


Fri Oct 21, 2011 4:58 am
Profile
Moderator
Moderator

Joined: Thu Mar 30, 2006 10:08 pm
Posts: 1188
Post Re: Dataset lookup
You should be able to use other functions like concat (string concatenation) within your lookup expression.

_________________
Nathan Boeger, CISSP-ISSAP, CCNP Voice, VCP
Not Another Industrial Blog - My SCADA software blog
"Design Simplicity Cures Engineered Complexity"


Fri Oct 21, 2011 5:34 am
Profile WWW
General
General

Joined: Thu Jul 31, 2008 2:08 pm
Posts: 386
Location: Chico, CA
Post Re: Dataset lookup
I do not understand how I could you the concat function. here is what my dataset looks like:

Attachment:
datasetpic.PNG
datasetpic.PNG [ 40.56 KiB | Viewed 351 times ]


I want to return the value in column "Text", but i want to lookup the number 2012 in column "y" and the number 4 in column "m"

Code:
lookup({Root Container.SellDays},2012,"","y","Text")


how do i incorporate column "m" in the above code?

_________________
Jonathan


Tue Mar 20, 2012 3:24 pm
Profile
Moderator
Moderator

Joined: Sun Apr 02, 2006 2:46 pm
Posts: 1982
Location: Sacramento, CA
Post Re: Dataset lookup  Topic is solved
You can't do that with the lookup function right now. However, you can add an additional column to the dataset (if it is a SQL query) called ym which is a concatentation of the year and month columns. In MySQL you can do the following:
Code:
SELECT CONCAT(year, month)

_________________
Travis Cox
Inductive Automation
Technical Support Rep.


Tue Mar 20, 2012 3:47 pm
Profile WWW
General
General

Joined: Thu Jul 31, 2008 2:08 pm
Posts: 386
Location: Chico, CA
Post Re: Dataset lookup
ok, i can do that. it sounded like it could be done on the ignition side.

Thanks,

_________________
Jonathan


Tue Mar 20, 2012 3:58 pm
Profile
Display posts from previous:  Sort by  
Post new topic This topic is locked, you cannot edit posts or make further replies.  [ 5 posts ] 


Who is online

Users browsing this forum: Majestic-12 [Bot] and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: