[Published July 17, 2018]
[Updated July 21, 2018]
[Updated July 31, 2018]
This blog post is for those of you that have upgraded the Survey123 field app to version 3.0 and realized that your surveys can no longer submit data to your feature layers.
Here is a screenshot of the error that the Survey123 3.0 field app will show when working against a feature layer with no supportsApplyEditsWithGloablIDs.
If your surveys do not show evidence that supportsApplyEditsWithGloablIDs is a problem, then you should ignore this blog post.
A little bit of context
As described in our Bull Release (3.0) announcement, the Survey123 3.0 field app no longer can submit data to feature layers where the supportsApplyEditsWithGloablIDs property is set to false. This is a somewhat obscure property that cannot be simply be turned on with the push of a button. Instead, it switches on automatically when your feature service meets a number of requirements:
- All layers within the feature service must have an indexed GlobalID field.
- All relationships (layer to layer, layer to table, layer to attachments, table to attachments) must use GlobalID fields (as opposed to ObjectID fields).
- If using an enterprise geodatabase, the feature service cannot include versioned feature classes.
- If using Portal for ArcGIS, only versions 10.4 and newer support this property.
The reason why Survey123 requires supportsApplyEditsWithGloablIDs is that this setting is critical in order to guarantee clean transactions when uploading attachments (particularly when working in low bandwidth conditions) and also to support nested repeats.
We are aware that many of you have feature services where supportsApplyEditsWithGloablIDs could not be enabled immediately, so we made available a backwards-compatibility build of Survey123 2.9 (also referred to as Survey123 Classic), which has been made available on Windows, Android and Mac. Apple has not yet approved this build in the store so far, but in exceptional cases Esri could provide access to older builds as a temporary measure (Please contact Esri Tech Support for that).
To download Survey123 Classic (2.9), use the version switcher in the top-right corner of our Survey123 for ArcGIS | ArcGIS Download page.
Survey123 2.9 (Classic) is a temporary solution for all of you who can't really adjust to the requirements of version 3.0. In this blog post I will describe a couple of approaches to enable supportsApplyEditsWithGloablIDs in your feature layers so you can work with 3.0 against your existing layers.
If you want to keep Survey123 3.0 (and other previous versions) working against your existing layers, then read on...
How to check if supportsApplyEditsWithGloablIDs is enabled in your feature layer
The supportsApplyEditsWithGloablIDs property is not advertised through the user experience in ArcGIS Enterprise or ArcGIS Online . This property is only visible within the json definition of your feature service.
- In ArcGIS Online or your portal in ArcGIS Enterprise, navigate to the Page Details of your Form and click on the Form Layer to open the Feature Layer behind your Form.
- Next, open the Services Directory view of your Feature Service and display it as JSON.
- Look in the JSON for the supportsApplyEditsWithGloablIDs
Working with Hosted Feature Layers in ArcGIS Online and Enterprise
If your feature service does not have attachments or relationship classes: This is the easiest scenario. To enable supportsApplyEditsWithGloablIDs, simply enable the sync capability in your feature service. This can be done through the Settings of the feature service. From ArcGIS.com go into your Content, navigate to your survey folder and look for the Feature Layer (not the views!). Then open the Item Details page and go to Settings. The Enable Sync capability is inside the Feature Layer (hosted) section. Do not forget to hit Save after you check Sync.
Enabling the Sync capability will automatically create and index GlobalId fields in your feature layer and supportsApplyEditsWithGloablIDs will switch to true. Once you have enabled sync, you can turn it off. The Sync capability will not have a negative performance impact on your feature layer, but you will not be able to disable queries in your layer if Sync is enabled. This is one of the main reasons why you may want to keep Sync disabled.
If your feature service has attachments and/or relationship classes: In this case, we need to overwrite your feature service with a geodatabse schema that includes one uniquely indexed GlobalID field per every layer and table in your service.Additionally, all attachment relationships must be based on GlobalID fields.. The following steps illustrate how to do this, without losing any data you may already have.
- In ArcGIS or your portal in ArcGIS Enterprise, navigate to the Page Details of your Form and click on the Form Layer to open the Feature Layer behind your Form.
- Download your Feature Layer data in File Geodatabase format and add the entire contents of the File Geodatabase into ArcGIS Pro.
- In ArcGIS Pro, run the Add Global IDs geoprocessing tool on all layers and tables in your File Geodatabase.
- In ArcGIS Pro, run the Migrate Relationship Class geopocessing tool against attachment relationship classes in your File Geodatabase.
- In ArcGIS Pro, run the Disable Editor Tracking geoprocessing tool against your File Geodatabase data.
- In ArcGIS Pro, set all the Editor Tracking fields in your File Geodatabase to "Read Only" using the Design/Fields view as shown in the next animation.
- Overwrite your Form Feature service using the Share/Web Layer/Overwrite Web Layer option in ArcGIS Pro.
- In your portal in ArcGIS Online or ArcGIS Enterprise, Enable Editor Tracking (in the Setting Dialog of your feature service as shown in the next screenshot) in the Form's Feature Layer.
Make sure you enable Keep Track of who created and last updated features. Do not get confused with the Keep track of created and updated features.
Working with Non-Hosted Feature Layers in ArcGIS Enterprise
For ArcGIS Enterprise, there are some situations where supportsApplyEditsWithGloablIDs cannot be set to true in a Feature Service. This is the case, for example, when your Feature Service works on top of versioned data or tables not registered in a geodatabase. Installing Survey123 2.9 (Classic) would be the only solution possible unless you unversion your data or move your data into a non-versioned geodatabase feature layer.
Other than the exceptions above, here are steps to enable supportsApplyEditsWithGloablIDs in ArcGIS Enterprise for non-hosted feature services:
- Add all layers and tables included in your Feature Service into an ArcGIS Pro session.
- In ArcGIS Pro, run the Add Global IDs geoprocessing tool on all layers and tables included in your Feature Service. It is very important that the new GlobalID fields are indexed using a unique constraint.
- If your feature service includes attachments: In ArcGIS Pro, run the Migrate Relationship Class geopocessing tool against attachment relationship classes included in your Feature Service.
- Overwrite your existing feature service to ensure that added GlobalID fields are now exposed through your Feature Service, by making them visible.
If after doing all the above, you still cannot see that supportsApplyEditsWithGloablIDs is enabled, then you can try the following:
- Overwrite your service definition ensuring this time that the sync capability is enabled.
- Enable archiving in your layers and overwrite your service definition.
Please note that while sync will not cause any performance degradation or overhead on your feature service, archiving might. If sync is enabled, you will not be able to disable queries in your feature layer.