ERROR
In a Survery123 for ArcGIS survey form, inputting a long response in a text field within a repeat section and clicking the Submit button returns the following error:
Error: Failed to submit. Operation rolled back. String or binary data would be truncated. The statement has been terminated.
Note: In text fields outside a repeat section, inputting a long response returns a character limit warning.
However, in text fields within a repeat section, no warning message is triggered when characters exceed the limit. The character count does not display at the bottom of the answer field. The image below shows a response with 257 characters does not trigger a warning message. The error is returned only when the Submit button is clicked.
The error is returned when the response exceeds the default character limit of 255.
As workarounds, increase the character limit of a text field within a repeat section, or create hints as reminders of the character limit.
Increase the character limit of a text field within a repeat section
In the Survey123 Connect for ArcGIS XLSForm, specify the character limit in the bind::esri::fieldLength field. For more information, refer to FAQ: What is the character limit of a text question type field in Survey123 for ArcGIS?
The images below demonstrate how a change in character limit from 255 to 2,000 in the XLSForm bind::esri::fieldLength field is reflected on the Schema Preview tab.
Note: The default character limit for a multiline text field in surveys created using Survey123 for ArcGIS Web Designer is 1,000, as opposed to 255 in surveys created using Survey123 Connect for ArcGIS. In Survey123 for ArcGIS Web Designer, increasing the character limit is accomplished using either one of these methods: (a) On the Edit tab: Click Edit and check the Set min./max. characters count option under the Validation section. Specify the Max. value and click Save. (b) On the Modify Schema page: Click Publish > Modify schema. Click the edit (pencil) icon and specify the character limit.
Create a hint for the character limit of a text field within a repeat section
In the Survey123 Connect for ArcGIS XLSForm, specify the hint in the hint field.
The images below demonstrate how a hint on the character limit in the hint field of the XLSForm is reflected on the survey form.
Get help from ArcGIS experts
Download the Esri Support App