String or binary data would be truncated- pinpointing and fixing error.

330
3
11-29-2022 05:54 AM
mcbeth99
New Contributor III

I don't think I have the understanding to figure this one out myself. I created a survey in Connect which was a copy of a previous survey.  I am not sure what if anything I changed from the original that worked just fine. 

I had two surveyors in the field and one was able to submit most of their forms with a handful that wouldn't send and gave her this error.  The other surveyor couldn't send any of their forms and is getting this error.

I get that the problem is the data being collected is longer than a field is set up for however I am not sure how to figure out which field it is or how to fix it.  Is there a way to fix it?

Example screen shot of the error is attached along with the XLSX Form from Connect.  

Tags (3)
0 Kudos
3 Replies
DougBrowning
MVP Esteemed Contributor

My guess would be FileName.  I think what you have will list all the file names which can easily go over 255 chars since the internal names are large.  Not sure why you would need this list so you can remove it.  Or make it larger using the bind::esri:fieldLength.  If it is just for user display you can set bind::esri:fieldType to null.

Hope that helps

0 Kudos
mcbeth99
New Contributor III

Thanks @DougBrowning . I need the file name for the photos so I can work with them once downloaded.

Where can I set the file name to be larger with bind::esri:fieldLength in Connect or Survey123?

Then do I just have to save the XLSX and re-publish? If I re-publish will I lose the data already collected?

0 Kudos
DougBrowning
MVP Esteemed Contributor

The file names would be in the attach table so you can get them from there also if that works.  I download and rename then all in script.

You set the field length in Connect yes and republish.  I am not actually sure if it will let you up the field length I forget.  SQL you can not sure on hosted.  It will warn you so you can test it but make a backup for sure.  Worse case you have to download then upload the data from backup back to the service.

There is a page somewhere that lists all the things you can change without a data wipe.  But I do not see it listed.  https://doc.arcgis.com/en/survey123/browser/create-surveys/publishsurvey.htm

Someone may know.

0 Kudos