ApplyEdits fails bc of issue with field name matching in survey repeat_count calculated field and DB name - all CAPs vs mixed Case.

378
1
10-03-2022 11:16 AM
Alex-Santos
Occasional Contributor

Hi! I'm using an existing feature service on our ArcGIS Server pointing to data in Oracle - one spatial layer and two related tables for repeat questions. The number of repeat questions are set using the number entered from a previous question. I.e., a user answers there were 2 persons involved. Then the repeat question, using repeat_count, will open 2 repeats to fill in name and other details.

The repeat_count variable creates a calculated field in survey123 schema that was not present in our database. Image: Survey123_Schema_Repeat_Count_MixedCase.PNG. 

So we created the field forcing it mixed case to match. Our published feature service shows the fields in mixed case. Image: Feature_Service_Repeat_Count_MixedCase.PNG

Trouble is, the survey web form is attempting to submit the record into a field in all caps. We can see this in the AGS server log. Image: ArcGIS_Server_Log_Repeat_Count_ALLCAPS.PNG.

How do I edit the xlsform's _count field so that it is all caps? Or is there a better way to utilize repeat_count in existing feature services to build surveys? Is the calculated field necessary and can I work around it?

1 Reply
Alex-Santos
Occasional Contributor

An update to share. I reached out to Esri support for some guidance - Esri Case #03164448This is a known issue and there are enhancement requests to address it. The following is a summary of our discussion:

  • We identified that due to the XLSForm's repeat_count field being added as a field to the feature service's schema and there being a limitation when it comes to editing this field, we are receiving a 400 error message when attempting to submit a record in Survey123. 
  • We discussed that this seems to be buggy behavior and that we are going to see if there is a potential workaround we can apply for this situation. 

After our call, I found the two following logged enhancements:

  • ENH-000127565 : Enhance Survey123 Connect so that the “repeat _count” field is not added to the schema and therefore not required in the feature service. (Status: Under consideration)
  • ENH-000127824 : Enhance Survey123 Connect to expose all fields that are required in the service in order to successfully publish in the Excel spreadsheet so they can be modified and edited. (Status: Closed as a duplicate of ENH-000127565)

It would appear that other users have also run into this mismatch issue with Oracle databases where all field names are in uppercase but the field generated by Survey123 are in lowercase. So for now, I think I can't use repeat_count unless someone has a workaround. 🙏 @IsmaelChivite, am I correct?