Select to view content in your preferred language

Cannot Add new Question to Survey123

662
4
09-03-2022 06:42 PM
StewartHolt
New Contributor II

I recently needed to add a few questions to a survey I had not modified since May 2022. It has a lot of valuable of data in it. In the past when I added new questions, it would list the new field names and I could click the switch to allow them to be added. It would confirm that the operation was safe and the fields would be added. Now in Sep 2022 when I try this, I get an error saying that the new field name is not unique in the table, that it is specified more than once. That is not correct. I can go into the Data table and click on fields and see the existing fields. When I try to add a new field in this view, I get the same error message as I got in Survey123Connect. I suspect that there is something preventing me from adding ANY field and that it results in this message. Is there any way the schema of the data is locked in some way? I am the owner and changes to Choices still work resulting in an updated app. What else should I look at?

I am using the latest version,  3_15_175, of Survey123Connect. See error message from attempt at adding a field from web browser (Latest Chrome on Win10).

0 Kudos
4 Replies
ChristopherCounsell
MVP Regular Contributor

Can you share the XLSForm?

Do you have the same field name in a related table?

0 Kudos
StewartHolt
New Contributor II

I am sure there is not a duplication of field names. I have searched the workbook. There is a link reference to another survey but I think there are no actual references left in this workbook. I cannot get rid of the link. There is an added tab named Scratch in this workbook where I have stored the changes which result in the errors There is a gap around line 29 for the group of 3 and the date_corrected line goes near the top. I am pretty sure the problem lies in the data layer, itself, because it will not let me add a field as described in the original post. I remember setting an option named something like "protect data from deletion" which I set on a web page recently for this survey. I have not been able to find this option again. I have attached the XLSForm for the survey.

ChristopherCounsell
MVP Regular Contributor

Thanks. Sometimes XLSForm configuration can cause issues. There are a few trailing spaces in the fields from row 55 but they don't appear to be tied to what you are seeing.
On that note, I would recommend pasting 'values only' in Excel to avoid overwriting the XSLForm formatting. Spaces in the name column should through a data validation error. Some of of the other cells have lost their drop-downs. This and the change in font can indicate that something is not configured correctly with the XLSForm but not preventing the survey from being published. Such scenarios can cause unexpected behaviour down the track. I don't suspect that is what is happening here if you cannot add a field directly to the feature service in ArcGIS Online.

Can you add other fields to the service? Are you working with the parent feature service (and not a view)?

If you go to the service endpoint, does the field exist for the layers?

Have you made any other changes to the service? Definition updates through rest?

If you have not already I would recommend lodging a support case.

StewartHolt
New Contributor II

I have made some progress. If I navigate to the Content tab and select this feature layer, I can edit fields in the table. The  "+ Add" button still fails to add a field with the message about duplicate field name. I also figured out why I can't edit data when accessing it from My Surveys. There is a geopoint type in these surveys at the end. It is highlighted in red and a message to enter a valid value is displayed. There are valid values shown and I have pulled out some into other survey fields and they are correct. This may be an intentional design expecting me to allow the desktop computer to reach the accuracy threshold and update the values. It would make no sense to do this away from the location where the survey was entered. With this condition, the Submit is rejected with message which stays on the screen only a tiny fraction of a second. I caught it in a video.

I was aware of your other points about the .xlsx file. I if get a copy of a new empty .xlsx from a new survey, can I just change the form title on the settings page to connect this to my data layer? If so, I can then carefully copy and paste (text only) to recreate this and have a fully functioning spreadsheet.

I will submit a support case for the problem adding a field.

Thanks