In-place equations with undefined values being cast as zero


#1

I have noticed that when an undefined value from a workflow gets transformed by a formula helper, then that value gets cast as 0 in the equation. For example, if engineTemperature is undefined, then {{add (multiply 1.8 data.body.data.message.dataReport.engineTemperature.value) 32}} calculates to 32 as though it were a valid measurement.

Is there a workaround for that?


#2

You could add a Conditional Node that checks for the existence of the value before using it. The condition would look something like the following:

{{ data.body.data.message.dataReport.engineTemperature.value }} !== undefined