ERROR

Failed to submit. String or binary data would be truncated. The statement has been terminated

Last Published: August 20, 2024

Error Message

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.

Cause

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.

typenamelabelcalculationbind::Esri:fieldLength
28textEdgeMatchingRequirementsDescribe Edge Matching  Requirements999
29calculateEdgeMatchingTextEdgeMatchingTextif(${EdgeMatchingRequired}='No',"No edge matching is required between jurisdictions",${EdgeMatchingRequirements})

Solution or Workaround

  1. Find any calculate fields in the survey's XLSForm.
  2. Increase the calculate fields' bind::esri:fieldLength parameter to accommodate the length of the fields from which they are calculated.
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.

Article ID: 000032268

Software:
  • ArcGIS Survey123 Connect

Receive notifications and find solutions for new or common issues

Get summarized answers and video solutions from our new AI chatbot.

Download the Esri Support App

Related Information

Discover more on this topic

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options