PROBLEM
In ArcGIS Survey123 Connect, when performing addition with inputs from multiple fields using the expression below, the calculation result displays incorrect values in the ArcGIS Survey123 survey forms.
${question_one} + ${question_two}
The image below shows an example of an incorrect calculation result for the addition of the total number of rooms and kitchens fields.
One or more fields in the calculation input are text or string fields. If an addition formula includes a text or string field, the (+) operator concatenates the field values instead of adding them.
Choose one of the methods below to resolve the issue.
Use the number() function in the calculation formula
Note: The number() function in the formula enables the text or string values in the calculation to be recognized as numbers.
(number(${question_1})+number(${question_2}))
The image below shows the example of a calculation formula to add up the fields with the text (total_rooms) and integer (total_kitchens) field types in the ArcGIS Survey123 Connect XLS form.
Set the data type as int in the bind::type column of the text or string field
Note: Alternatively, add a new bind::type column if it is not created by default, and fill in the cell of the text or string field with int.
int(${question_1}) + int(${question_2})
The image below shows the correct calculation result for the addition of the text and integer field values in the ArcGIS Survey123 survey form.
Article ID: 000024531
Get help from ArcGIS experts
Download the Esri Support App