See attached xlsx form.
When I add 1 to a field set to type integer I get the expected result of 1 more than the integer value
e.g: 1 + ${int}....if int = 2 the result is 3
However if I change the integer field to calculate or hidden and 1 to the value of the field I get an unexpected result of a the calculate or hidden value with a leading 1. In this case I also have the field type set to Integer
e.g: 1 + ${calc}....if calc = 2 the result is 12
Am I doing something wrong here or is this a bug?
Solved! Go to Solution.
Hi Brent,
Calculate questions are text by default, causing the 'addition' to being string concatenation (i.e., 'a' + 1 = 'a1'). You would either need to convert the value using either int() or number() functions, or create a bind::type column in you worksheet and specify either integer or decimal as the type of the calculate question.
Hi Brent,
Calculate questions are text by default, causing the 'addition' to being string concatenation (i.e., 'a' + 1 = 'a1'). You would either need to convert the value using either int() or number() functions, or create a bind::type column in you worksheet and specify either integer or decimal as the type of the calculate question.
Thanks James, The int() function worked great. The bind::type set to integer alone did not make a difference.