Field [name] in [Survey Title] length is too short 25.

185
5
04-15-2019 05:01 PM
New Contributor

I want to add a new item to my Choices domain tab. In the past I have just added the item in a new line on my spreadsheet, updated the survey, published it, and the new item shows up as a new select_one option in the survey. Simple. However, when I try to add this new (slightly longer) item, I get this error: 

Field Surfactant in Pesticide Application record length is too short 25.

I tried increasing the bind::esri:fieldlength for my Surfactant row to 30 and 50 and even 255 to accommodate the new item I want to add to my Choices (which is only 27 characters), but every time I get this same exact error about "...record length is too short 25."

Why do I get this same message, despite the fact that I increased my field length? Why does it still think it is 25 (and thus too short for my new item?)

Reply
0 Kudos
5 Replies
Occasional Contributor III

Hi,

Sounds like your existing feature service has the field set at 25 characters. To change to more than 25 you will need to republish the feature service (and risk losing existing data) or create a new feature service with longer field length.

Regards,

Craig

Reply
0 Kudos
MVP Frequent Contributor

The old 123 versions would look at your list, pick the longest item, then use that as the field size.  This of course becomes a pain so now 123 will default all the lists to 255.  

How old is your Connect?  The newer versions can handle some of these changes now.

Reply
0 Kudos
New Contributor

Hello Doug, 

I think that is exactly what happened, but I don't understand why I can't just increase the length to 255 manually? That is more than 25, so it would not truncate any existing data...

I have added new items to the Choices list many times in the past, but this one instance is tricky. I even tried changing my new list item to be under 25 characters, but it still gave me the some error message about "the length is too short 25"?

We built the Excel spreadsheet in 2016, but just entered a large backlog of data and I would hate to lose all that work. We want all of our data in one place so that we can easily share the map of our inspections and see what we did and when... Any solutions to this?

If I absolutely must delete and re-publish, how can I get all of my existing data back into the new feature service expeditiously?

Thank you!

Reply
0 Kudos
MVP Frequent Contributor

When you say change manually do you mean you are changing the Feature Service that the survey points to or just changing it in the form?  You need to change the service so that it matches the 255 the form now wants.

Have you recently updated 123 app or connect?  I thought the newer versions could handle a field size change now.  So if you have not that may work.  Or it could be that you did update and it is trying to change all your list fields to 255?  Do you know for sure it is that field?  You say it is a 2016 form so not sure if the form or Connect has been updated.

If you need republish in the end there are some ways.

First make a backup copy using export to GDB.  Check this file to make sure you got it all and your global ids are ok.  I have done this method many times except not when global id relationships are in there.

One way is to let 123 wipe the service and "fix" it.  (That is what it is warning you off right?)

Then use ArcPro and the Append tool to copy the data from your export over to the new service. (You can do it in ArcMap but it is harder and more prone to die, esp on a lot of data).  This is where I am worried about the parentgloabalid and such.  Pro does have a new setting to preserve globalids on copy though I think.

The other way, esp if it is a linked service, is to download the gdb.

Change the field sizes in the GDB.

Publish this as a service from Pro or Map overtop of the original.  Since it has all your data in it will go up with it.  Again worried about globalids here.

Hope that helps

Reply
0 Kudos
New Contributor

Thank you, Doug! As a work-around I just shortened  my new choice name so that it is <25 characters and now the survey is functioning as intended. BUT, if we encounter this issue again, I will try one of your solutions. 

Many thanks!

Reply
0 Kudos