How to use Survey123 with existing feature service?

9048
20
05-01-2017 01:16 PM
KyleWikstrom
Occasional Contributor II

Hi all,

I have followed the instructions in the documentation (Use Survey123 with existing feature services—Survey123 for ArcGIS | ArcGIS ) to use Survey123 with an existing feature service published on ArcGIS Server 10.4.1 but with little success. I am attempting to Generate a Survey from a Feature Service. I have published a very simple point layer with two attributes (string, no domain) and secured it in ArcGIS Server Manager by creating a security Role and a User with the appropriate role permissions. I registered this secure service as an item in the AGO organization and saved the AGS User credentials.

In Survey123 Connect, I have chosen to create a new survey, selected from a Feature Service, and chosen the secured service that I registered in AGO. The survey is created and published without issue. I downloaded the form onto Survey123 for Windows and started collecting a new survey. When I attempt to submit the survey, I get the following:

Send Error

This survey was not able to be sent due to the following error: Code 400 Unable to complete operation.

Has anyone encountered and resolved this issue? What is the cause? What is the solution? Is there specific documentation, step-by-step, that exists describing how to generate a survey from a feature service using ArcGIS Online and a non-federated AGS, from start to finish?

Thanks all!

0 Kudos
20 Replies
JamesTedrick
Esri Esteemed Contributor

Hi Kyle,

Can you provide a copy of the Feature Service's REST JSON?  There are some specific requirements, like the service needing GlobalIDs.

KyleWikstrom
Occasional Contributor II

Hi James,

I hope this is the REST JSON to which you are referring. I know this feature class does not contact GlobalIDs, and that is something I will include. Perhaps you will notice if there's other issues here.

{  "currentVersion": 10.41,  "serviceDescription": "",  "hasVersionedData": false,  "supportsDisconnectedEditing": false,  "syncEnabled": false,  "supportedQueryFormats": "JSON, AMF",  "maxRecordCount": 1000,  "capabilities": "Create,Delete,Query,Update,Uploads,Editing",  "description": "",  "copyrightText": "",  "spatialReference": {   "wkid": 102100,   "latestWkid": 3857  },  "initialExtent": {   "xmin": -2.399464068675016E7,   "ymin": 1570805.4094059898,   "xmax": 2.2757327817186855E7,   "ymax": 3.395587017953554E7,   "spatialReference": {    "wkid": 102100,    "latestWkid": 3857   }  },  "fullExtent": {   "xmin": -2.0037507067161843E7,   "ymin": -1.0083317063032694E7,   "xmax": 2.0037507067161843E7,   "ymax": 3.024097195838615E7,   "spatialReference": {    "wkid": 102100,    "latestWkid": 3857   }  },  "allowGeometryUpdates": true,  "supportsApplyEditsWithGlobalIds": false,  "units": "esriMeters",  "documentInfo": {   "Title": "",   "Author": "",   "Comments": "",   "Subject": "",   "Category": "",   "Keywords": ""  },  "layers": [   {    "id": 0,    "name": "CommunityCenter"   }  ],  "tables": [],  "enableZDefaults": false }
0 Kudos
JamesTedrick
Esri Esteemed Contributor

Hi Kyle,

Yes, this what I was looking for- the GlobalIDs would be an issue.  See Mitchell's comment below- support for non-hosted services was only introduced with 1.10 in December

MitchellProctor
Occasional Contributor II

While this might not be causing this problem in particular, I do want to point out that it appears your version of the Survey123 app is quite old (I'd guess it's a version from before last year's UC, since that's when the UI was updated). Updating would give you a lot of added support, especially if your version of Survey123 Connect is more recent as well.

0 Kudos
PhuNguyen
New Contributor III

I have same problem.

My database is enterprise geodatabase.

1. ArcGIS for Desktop 10.4.1.

2. ArcGIS for Server 10.4.1.

3. Portal for ArcGIS 10.4.1.

4. Survey123 for ArcGIS 2.1.6

5. Survey123 Connect for ArcGIS 2.1.9

6. Create survey with an existing feature services.

7. Nonversioned data, enable archiving on the dataset, include Global ID on the dataset, not have relationship classes and attachments.

What is the solution?

0 Kudos
JamesTedrick
Esri Esteemed Contributor

Hi Phu,

Can you share the XLSForm used to author the survey?  Also, can you provide a screenshot or the JSON of the feature layer's REST endpoint?

0 Kudos
PhuNguyen
New Contributor III

Hi James,

JSON:

{  "currentVersion": 10.41,  "serviceDescription": "",  "hasVersionedData": false,  "supportsDisconnectedEditing": false,  "syncEnabled": true,  "syncCapabilities": {   "supportsRegisteringExistingData": true,   "supportsSyncDirectionControl": true,   "supportsPerLayerSync": true,   "supportsPerReplicaSync": false,   "supportsRollbackOnFailure": false,   "supportsAsync": true,   "supportsAttachmentsSyncDirection": true,   "supportsSyncModelNone": true  },  "supportedQueryFormats": "JSON, AMF",  "maxRecordCount": 1000,  "capabilities": "Create,Delete,Extract,Query,Sync,Update,Uploads,Editing",  "description": "",  "copyrightText": "",  "spatialReference": {   "wkid": 102100,   "latestWkid": 3857  },  "initialExtent": {   "xmin": -5.963702636845884E7,   "ymin": -9720060.791222837,   "xmax": 5.963702636845884E7,   "ymax": 3.3265068604224768E7,   "spatialReference": {    "wkid": 102100,    "latestWkid": 3857   }  },  "fullExtent": {   "xmin": -2.0037507842788246E7,   "ymin": -3.024097145838615E7,   "xmax": 2.0037507842788246E7,   "ymax": 3.024097145838615E7,   "spatialReference": {    "wkid": 102100,    "latestWkid": 3857   }  },  "allowGeometryUpdates": true,  "supportsApplyEditsWithGlobalIds": true,  "units": "esriMeters",  "documentInfo": {   "Title": "",   "Author": "",   "Comments": "",   "Subject": "",   "Category": "",   "Keywords": ""  },  "layers": [   {    "id": 0,    "name": "Báo sự cố"   }  ],  "tables": [],  "enableZDefaults": false }
XLSForm
0 Kudos
JamesTedrick
Esri Esteemed Contributor

Thanks Phu,

There is an issue currently with Survey123 and Portal field names - the field names need to be lower-case.  We're working on fixing this in a future release.

PhuNguyen
New Contributor III

Hi James,

Does Survey123 for ArcGIS version 2.2 fixed?

0 Kudos