Code 400: Unable to add feature service layer definition

708
6
11-08-2022 03:35 PM
MikeDoyle2
New Contributor II

I am having trouble publishing my survey as I get a code 400 from Survey 123 Connect whenever I try to publish (see below). The survey has already been published but I would like to update it with the new changes that have been made.

MikeDoyle2_0-1667950214870.png

MikeDoyle2_1-1667950290854.png

The field in question "disclaimer_arl_fss" is located at the bottom of the survey in the survey tab and is a "text" type. How can I fix this issue and successfully publish my survey?

MikeDoyle2_2-1667950401143.png

 

Tags (3)
0 Kudos
6 Replies
ZacharySutherby
Esri Regular Contributor

Hello @MikeDoyle2

Since the survey is pointing to a hosted feature service view, Survey123 Connect is not able to add the field to the view layer. You will need to add the field to the views parent feature service and ensure it propagates to the view layer so that the schema will match your XLSForm. 

Thank you,
Zach
MikeDoyle2
New Contributor II

Thank you for your prompt response. This field was already XLSForm when I brought it into Survey 123 Connect to edit. I merely added additional columns to translate the statement into multiple languages. 

0 Kudos
DougBrowning
MVP Esteemed Contributor

You must have based the form on a View layer.  Views are just pointers to the actual service.  If you want to add fields you need to update the service it self.  You can try and repoint to the service or add the fields to the service manually.   I suggest reading up on views  https://doc.arcgis.com/en/arcgis-online/manage-data/create-hosted-views.htm

 

0 Kudos
RogerAsbury
Occasional Contributor

Man, what perfect timing. I too am having this problem! It started yesterday when I attempted to add a Note field to my survey. A field that requires NO user input, yet wants to create a new field in the survey database. I've added fields to this survey using Survey123 Connect before, but attempting to add this one results in the same error Mike is getting. If I remove the Note field I've added, the error goes away.

According to other answers I've seen elsewhere I've chosen Save As... in my spreadsheet and given it a different name in a different location. Then using Survey123 Connect to open that new spreadsheet, I was able to publish and generate a new survey. This works, even with the offending Note field. But this is definitely NOT a preferred method. It doesn't retain any submitted surveys, if you're modifying a production survey (which you probably shouldn't be doing anyway) and it breaks any maps or views that you may have created to analyze data from the original survey. (Not to mention anything that relied on webhooks from the original survey, which now has to be recreated in the new survey...)

It still boggles my mind that there are two products to create surveys for Survey123 and they are not compatible. The moment you touch a survey with Survey123 Connect, you can no longer use the web based survey editor. These two things should be cross compatible. This needs to be fixed. It's not a feature, it's a bug.

--
Roger Asbury
Analyst/Programmer - Fairbanks North Star Borough
0 Kudos
DougBrowning
MVP Esteemed Contributor

You can set the bind esri field column to null then you can have a field in your form that is not in the hosted service.  If not needed in the data this works great.

You should be able to add a field ok though.  It sounds like OP is pointing to a view and not a layer.  Seems like something else may be up.

RogerAsbury
Occasional Contributor

Setting that field to null worked in my case. Makes the error seem all the weirder though, since no view service was ever being modified...

--
Roger Asbury
Analyst/Programmer - Fairbanks North Star Borough
0 Kudos