操作方法

Survey123 错误:提交失败。 字符串或二进制数据被截断。 该语句已终止

Last Published: August 20, 2024

描述

当收到以下 ArcGIS Survey123 提交错误时,此消息指示已提交的值的字符数超过给定字段的调查设置允许的字符数。

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

但是,引发问题的字段并非总是显而易见,可能是由调查表单中未直接显示的字段所导致。 即使表单上的所有问题都阻止用户提交超过长度限制的响应,但此错误仍可能出现,由此导致过长的响应看起来不可能是错误的原因。

原因

在 XLSForm 中,“calculate”类型的字段在 bind::esri:fieldLength 列中的值可能小于计算这些字段所依据的字段的 bind::esri:fieldLength 值。 当“calculate”字段尝试引用超出其自身参数限制长度的值时,将无法提交调查表单并会抛出错误。

例如,在以下 XLSForm 示例中,将使用相应表达式计算第 29 行上的“calculate”字段,该表达式将引用第 28 行上字段 ${EdgeMatchingRequirements} 的值。 第 29 行上字段的 bind::esri:fieldLength 参数的长度小于第 28 行上的 fieldLength 参数。 在本示例中,第 29 行上的 bind::Esri:fieldLength 参数为空,默认值为 255。

类型名称标注计算bind::Esri:fieldLength
28文本EdgeMatchingRequirements描述边匹配要求999
29calculateEdgeMatchingTextEdgeMatchingTextif(${EdgeMatchingRequired}='No',"No edge matching is required between jurisdictions",${EdgeMatchingRequirements})

解决方案或解决方法

  1. 在调查的 XLSForm 中查找任何 calculate 字段。
  2. 增大 calculate 字段的 bind::esri:fieldLength 参数,以适应计算这些字段所依据的字段的长度。
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.

文章 ID: 000032268

获得人工智能支持

使用 Esri Support AI Chatbot 快速解决您的问题。

立即开始聊天

相关信息

发现关于本主题的更多内容

获取来自 ArcGIS 专家的帮助

联系技术支持部门

立即开始聊天

转至下载选项