survey123 string or binary data would be truncated

6591
13
11-07-2017 07:07 AM
CaitlinSmith2
New Contributor II

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
JamesTedrick
Esri Esteemed Contributor

Hi Caitlin, 

Unfortunately, modifying the length of text field storage is not capable within ArcGIS Online, so Survey123 cannot support it.

0 Kudos
CaitlinSmith2
New Contributor II

Thanks James. What about the bind::esri:fieldType column in Survey123 Connect? This is where I changed the number to 1000 to override the default value of 250. 

0 Kudos
JamesTedrick
Esri Esteemed Contributor

Hi Caitlin,

That will set the size on initial publishing only- it can't update the size due to the limitation with ArcGIS Online.

0 Kudos
TimnaG
by
New Contributor II

Hi James,

Couple of questions:

  1. If we were to set the field length prior to publishing to a value well over 255 characters - what is the upper character limit?
  2. Also - if a survey has been published, but not yet gathered any responses, could Esri not allow for change of field length in Survey123 Connect?

This would allow more flexibility for anyone who has to create surveys for clients/managers who have had a 'change of heart' in the direction they are taking after giving initial instruction (like that never happens LOL). Or is there a workaround by adding a new multiline text field in the XLSForm with the required increased character length specified in the bind::esri:fieldLength column? Or any other 'workaround'? Thanks.

diegocarvalho
New Contributor III

Hi James,

In addition to Timna's points, from what I got, we cannot update the field lengths once the survey is publisher, correct?

BUT, here are a few questions:

  1. The forms filled through the web browser respect the same field length as the ones filled in Survey123 app or the web version is limited to 255 characters and can't be changed?
  2. If we change the field length in Connect and republish the survey, it will be changed in the Apps, but not in the web forms?

Tks!

0 Kudos
JamesTedrick
Esri Esteemed Contributor

Hi Diego, Timna,

On Timna's questions:

1) On the maximum length- the max length for a file GDB's field is 2.147 million (see File geodatabase size and name limits—Help | ArcGIS Desktop ); I would presume that AGO could support that as well.

2) On changing field properties while the feature class is empty - this is possible in the ArcGIS Desktop environment using Alter Field—Data Management toolbox | ArcGIS Desktop . Currently, this is not available in the ArcGIS Online environment.

On Diego's questions:

1) The web browser and field app forms observe the same limitation

2) The field length cannot be directly changed in Survey123 Connect; you would need to delete the field and then recreate it with the new length.

diegocarvalho
New Contributor III

Thanks James,

Would there be any other cause for the error message? ("String or binary data would be truncated. The statement has been terminated.")Error message after trying to submit the filled form

0 Kudos
JamesTedrick
Esri Esteemed Contributor

Hi Diego,

There are other potential causes, but most are related the size of a string field.  For example, Survey123 Connect used to publish a select_one question's field with a length long enough to hold the values listed at the time of publishing; if a longer entry was added, that would result in this error as well.

0 Kudos
TylerBragg2
Occasional Contributor II

James,

I encountered this error after setting several text fields to "multiline," but not setting the character limit. I republished the blank survey with the character limits set, and it works fine without the error now. I wouldn't have thought to do this without this thread.

Thanks!

Marvin