Lookup expression not returning decimals. Bug?

Hi, I'm trying to lookup a decimal value from a dataset. I get an integer in return.
-Am I doing something wrong?

see attached screenshot:
Lookup expression not returning decimals

The user manual lookup page states:

lookup(dataset, lookupValue, noMatchValue, [lookupColumn], [resultColumn])

Note: The type of the value returned will always be coerced to be the same type as the noMatchValue.

So your expression
lookup({Root Continer.Table 2.data}, 'Decimal Value 4.4', -99)
reads,

  • lookup the data dataset,
  • find a string with literal value 'Decimal Value 4.4',
  • if not found then return value '-99', otherwise format the result as an integer,
  • search for the lookup value in column 0 (default),
  • return the value from column 1 (default).

https://docs.inductiveautomation.com/display/DOC81/lookup

Try changing the default to -99.0.

7 Likes