Unexpected result when integer field type is chaged to calculate or hidden

139
2
Jump to solution
11-15-2017 11:43 AM
Highlighted
Occasional Contributor III

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?

Reply
0 Kudos
1 Solution

Accepted Solutions
Highlighted
Esri Esteemed Contributor

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.

View solution in original post

2 Replies
Highlighted
Esri Esteemed Contributor

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.

View solution in original post

Highlighted
Occasional Contributor III

Thanks James, The int() function worked great. The bind::type set to integer alone did not make a difference.

Reply
0 Kudos