String or binary data would be truncated Error

10367
15
Jump to solution
04-03-2019 02:12 PM
BrandonA_CDPH
Occasional Contributor II

I have created a form in Survey 123 Connect.  I tested it in Connect, no problems.  I uploaded it to AGOL and tried to submit a response through the desktop app, no good.

When I attempt to submit a completed form though the iPad or desktop Survey123 apps, it returns an error: SEND ERROR - This survey was not able to be sent due to the following error: - string or binary data would be truncated. The statement has been terminated. - Do you want to edit this survey? Yes - No

I have done some research and spent several hours troubleshooting.  I see a few places which talk about this happening when the field length of a calculated field exceeds the length allowed by the feature service.  I do not seem to have that problem (the only calculated field that is relevant in this submission is a field that combines text and I already made the field length for that field and the fields it is combining appropriate).  Also attempted to publish it as a completely new survey and that didn't solve the problem either.

So, what could be causing this and how do I fix it?  I can attach the spreadsheet I'm using to make the form, but I would have to change a few things for confidentiality and am trying to avoid chasing down those bugs too.

Thank you in advance for your help.

15 Replies
JamesTedrick
Esri Esteemed Contributor

Working with Andrew's form the issue was identified - a field that got the PositionSourceInfo property from device.  This should be at least 150 characters (I would recommend using the default 255).

AndrewHargreaves2
Occasional Contributor III

Thanks once again James Tedrick‌ !

0 Kudos
MichaelSlevin
New Contributor II

James,

Sorry to add onto a thread that's approaching its first birthday, but this is the rabbit hole I've followed with my error.

I am getting the error listed above (String or binary data would be truncated. The statement has been terminated).

I have confirmed through the schema preview that all field lengths are set to the standard 255.

Furthermore, I have checked and none of the select_one nor select_multiple questions have a character count anywhere near 255 (longest is about 104).

None of the handful of responses entered into the note fields are anywhere near 255 either.

I have considered resetting the fields to 1000 anyway, but get a message advising that data could be lost - not something I'm super keen on doing.

Help!

Eduardo_Fernandez_EsriAu
New Contributor II

Hello everyone.

I too received the same error when submitting data via Survey 123 mobile app. I found that question B had a  'relevant' field formula that was expecting question A to equal 'Yes'. The problem was that question A ( being a select one) did not have 'yes' as a choice list option.

I removed the 'relevant' field condition ( in my case it was redundant), republished to ArcGIS Online, redownloaded the survey on my device and presto! submission worked. 

Alternatively, add 'yes' to the choice list for question A if applicable.

Cheers Ed 

0 Kudos
JasonTrussell
New Contributor II

Wondering if i could get some help with this Error as well.  Tried all the things above and still getting those "String or Binary Data would be Truncated " errors.  This Form has worked before and i copied it to Create a Test and now I'm getting these errors on the App and in Connect?  Any help would be great.

 

thanks ,

Jason

Fields getting errors:

Storm Name, Substation, Circuit, County, JobNumber

 

0 Kudos
mzhang
by
New Contributor III

FYI to anyone else looking at this thread trying to troubleshoot--I was getting this error too because responses that were longer than the field length weren't getting flagged for a text question. Seems to be a bug that only happens in repeats. As a workaround I added a constraint to the question so answers that are too long would be flagged and added a note that acts as a character counter.

0 Kudos