I’m trying to write a script which will do some math on values from 3 columns and store it in a 4th column. I’ve got pretty much everything in place but fail at calculating the said expression - it always gives NaN as the result.
After some investigation, it turns out that the script fails to correctly read data obtained using the valueForColumn method.
var val = item.valueForColumn(col)
< [object Decimal: 1]
var res = val * 5
How do I obtain the numerical value correctly?