ERROR
When the following ArcGIS Survey123 submission error is received, this message indicates that a value(s) has been submitted with more characters than the survey's settings allow for a given field.
Failed to submit. String or binary data would be truncated. The statement has been terminated
However, the offending field is not always obvious, and can be caused by fields that are not apparent from the survey form. This error may occur even if all questions on a form block users from submitting responses over the length limit, making it appear as though excessively long responses must not be the cause of the error.
In an XLSForm, fields of the "calculate" type may have values in the bind::esri:fieldLength column that are lower than the bind::esri:fieldLength value for the fields from which they are calculated. When a "calculate" field tries to pull in values that are longer than its own parameters allow, the survey form cannot be submitted and throws the error.
For example, in the representation of an XLSForm below, the "calculate" field on line 29 is calculated using an expression that pulls in the value from the field on line 28, ${EdgeMatchingRequirements}. The bind::esri:fieldLength parameter for the field on line 29 is shorter than the fieldLength parameter on line 28. In this example, the bind::Esri:fieldLength parameter on line 29 it is blank, which defaults to a value of 255.
type | name | label | calculation | bind::Esri:fieldLength | |
28 | text | EdgeMatchingRequirements | Describe Edge Matching Requirements | 999 | |
29 | calculate | EdgeMatchingText | EdgeMatchingText | if(${EdgeMatchingRequired}='No',"No edge matching is required between jurisdictions",${EdgeMatchingRequirements}) |
Caution: When changing the fieldLength parameter and republishing the survey, Survey123 Connect overwrites the survey's feature layer and you will lose the data that you've already collected. (You will see a warning about this when republishing the survey.) There is another way to do this without losing existing data. Please see the references listed below for instructions.
Get help from ArcGIS experts
Download the Esri Support App