Dataset lookup
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
Page 1 of 1 |
[ 5 posts ] |
| Print view | Previous topic | Next topic |
| Author | Message |
|---|---|
|
Lieutenant ![]() Joined: Fri Jun 25, 2010 5:19 am Posts: 71 Location: Jacarei, Brasil |
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 |
|
|
Moderator ![]() Joined: Thu Mar 30, 2006 10:08 pm Posts: 1176 |
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 |
|
|
General ![]() Joined: Thu Jul 31, 2008 2:08 pm Posts: 360 Location: Chico, CA |
I do not understand how I could you the concat function. here is what my dataset looks like:
Attachment: datasetpic.PNG [ 40.56 KiB | Viewed 287 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 |
|
|
Moderator ![]() Joined: Sun Apr 02, 2006 2:46 pm Posts: 1974 Location: Sacramento, CA |
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 |
|
|
General ![]() Joined: Thu Jul 31, 2008 2:08 pm Posts: 360 Location: Chico, CA |
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 |
|
|
|
Page 1 of 1 |
[ 5 posts ] |
|
|
All times are UTC - 8 hours |
Who is online |
Users browsing this forum: danielsoar, Google [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 |


