Select to view content in your preferred language

Unsure how to fix "ERROR: Adding field to the table failed."

3796
9
03-07-2019 08:41 AM
Zachary_Davis
Emerging Contributor

Hello, 

New to survey123 and i have been working on a satisfaction survey. I recently revised it and got the this when trying to publish:

  • ERROR: Adding field to the table failed.                                                                                                                     

Since i'm  not too familiar with this i thought someone could help me out. 

Any suggestions?

0 Kudos
9 Replies
JohnathanHasthorpe
Esri Regular Contributor

Hi Zachary - can you describe the changes that you are making - i.e. what fields are you adding (names and types)?

Thanks

John

0 Kudos
Zachary_Davis
Emerging Contributor

The survey is comprised of single line texts, dropdown boxes, likerts. Its mostly yes or no questions with rules that show different fields for yes vs no. I'm worried that my dropdown box has too many choices (53). The survey requires the submitter to choose what department/enterprise they are and there are currently 53. Hope this helps. If you need more in-depth info, i can provide.

0 Kudos
IsmaelChivite
Esri Notable Contributor

Hi Zachary. It is possible that  you may have added (and then removed) a question from your survey which created a field that now conflicts with a new question you are adding. I understand that you are still experimenting with the design of the survey and you have no data from users. If this is the case you may want to simply go into the survey gallery in the Survey123 website and use the save as option to create a second clean version of your survey.

FeliciaAlingu1
New Contributor

I am having the same problem. I did create a copy of the survey and tried to publish, but I got the same error.

Zachary_Davis
Emerging Contributor

Hello, 

So i have created 2 new surveys from the "save as" tab and have gotten the same result. My guess is that the survey is becoming too complicated and will require me to download the survey123 connect. If there are any other suggestions, i'm happy to try them. 

0 Kudos
Zachary_Davis
Emerging Contributor

Possible solution: When you go in to publish, select the modify schema and look under the name column 

Some of my questions were longer than 32 characters and kept it from adding to the survey database.

Also all of my questions had a "other" selection in the choices which just makes your name field even longer. I went through and found all of my questions and answers that were longer than 32 characters and gave them short names.

BugPie
by
Frequent Contributor

I was getting the same behavior when Publishing a Survey that was created in the web interface and being published as a Portal service. Same basic no details error message as in OP. Furthermore the server manager logs UI just reiterated the same message. Neat.  

I believe I was able to capture the actual error by switching the the desktop app for publishing designing surveys. From the desktop app I was able to see a more robust error message that read something like

"You can't use an uppercase letter in the field name" 

VIOLA! The name of my date field was simply "Date" and once I changed to "date" I was able to publish from the desktop app with an error. Anyone stuck on this I would recommend using the desktop app to see if a better error message comes out. For some reason my Hosted db is a bit more finicky than AGOL db I guess? IDK, but it works now after updating names of fields with lowercase. 

0 Kudos
DougBrowning
MVP Esteemed Contributor

Date is a reserved name in many database types.  Better to use something like FormDate.  It may let you use date now but it could cause issues later.  It happened to me.

There is a list of reserved words on the types tab - but just looked and strangely date is not on there.  

BugPie
by
Frequent Contributor

Ah, that is right, thanks for the reminder Doug.

I'm really just taking Survey123 for a test drive with our Portal so I wanted to share my troubleshooting success.  

Cheers! 

0 Kudos