Select to view content in your preferred language

survey123 string or binary data would be truncated

7438
13
11-07-2017 07:07 AM
CaitlinSmith2
Emerging Contributor

Hi Esri World,

I created a survey using Survey123 Connect and sent it out. Some users report that they get an error message that says: "String or binary data would be truncated. r/n the statement has been terminated" when attempting to answer a multi-line text question. I changed the character limit for this question from the default to 1000, but that doesn't seem to be helping. Any ideas?

Caitlin

13 Replies
WillWoodroof
Occasional Contributor

Hello,

I have the same error message that is related to a uuid() calculation that is being done. Within Survey 123, I have the ESRI Field type set to "esriFieldTypeString" and my character limit to 10 which matches the size of the text field that it is feeding in AGOL Feature Service. If I take the uuid() calculation off, everything works. Any ideas on how to overcome this issue? Perhaps a different calculation to populate a unique ID for a column, or change of field/limit settings?

Thanks,

Will

0 Kudos
WillWoodroof
Occasional Contributor

James,

additional note: if I click on this field that is being populated with the uuid() in the survey on the mobile app, then go to the next field without doing anything to the random value calculated, the form submits fine...So if I don't change any values, just select the field, then go to the next and it works. If I do nothing to this field> fill out the rest of the survey, then it will not submit giving me the error described above.  Seems like a bug. Any idea how to overcome this? This field is not set to "required" either.

Thanks,

Will

0 Kudos
BernardRIXEN
Esri Contributor

Hi Diego,

I have found that when invoking a web service through JavaScript (see https://community.esri.com/t5/arcgis-survey123-blog/extending-survey123-smart-forms-with-custom-js/b... ), the JSON output can be big. The hidden JSON line in the XLSForm is another place to look at for an appropriate field length.

Regards, Bernard

WilliamRockwell1
Occasional Contributor

I had this same problem. I had a survey that pulled weather data, and the JSON field was set to string 256. I changed the length to 1000 and it worked. 

0 Kudos