Table Lookup DR Wish (AF 2.6?)

Discussion created by rdavin Employee on Aug 31, 2012
Latest reply on Sep 12, 2012 by rdavin

I can't stress enough that this is a wish for a future version of AF.  I fully well don't expect to see it in 2.5.


For the Table Lookup data reference, I'd like an option to specify a return value if the lookup fails to return a row in the table.  Sometimes I'd like the 'not found' value to be a specific value with a good status, perhaps a 0, and sometimes I'd like it to be a digital state with a bad status.  I'd imagine it would be used something like:


SELECT Value FROM Measurements WHERE Name = @Tagname;UOM=°F;TC=Time;NotFoundValue=0


Perhaps there would be a NotFoundValue versus a NotFoundState option. 


Granted the example above uses a time column and would only fail if the value in Tagname is not found in the Name column of the AFTable.  But I have other uses where a time column is not used and there are compound pieces of the WHERE clause.  One example is a table storing some serial numbers with a few Booleans to denote configuration settings.  For about 95% of the SN's, there is a default so we only really need to store a small amount of exceptions to the default.  This would be a smaller table in memory, smaller means quicker to process, and we don't have to worry about keeping the table up to date with every SN in existence; rather we only need to log the exceptions.


BTW ... the time column feature of tables is a really cool new feature to AF.  Kudos to the development team on this one.  My company doesn't have an immediate application for it as our current emphasis is migrating what we have in 2.4 to be 2.5 ready.  But we do have a few things on the drawing board where the time column fits in nicely.